-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
What steps will reproduce the problem?
1. receive data from peer.
2. new message, set message type and put Attribute
3. encode.
What is the expected output? What do you see instead?
I wish get a byte array, but an Exception occured.
What version of the product are you using? On what operating system?
I get latest version source code by svn.(2014-11-24)
I run it on Windows8.1
Please provide any additional information below.
I found the method/function "encode()" in
"org.ice4j.attribute.DataAttribute.java" maybe has a bug:
byte binValue[] = new byte[HEADER_LENGTH + getDataLength() +
(padding ? (getDataLength() % 4) : 0)];
it should be written so:
byte binValue[] = new byte[HEADER_LENGTH + getDataLength() +
(padding ? ((4-(getDataLength() % 4))% 4) : 0)];
Original issue reported on code.google.com by iYung...@gmail.com on 24 Nov 2014 at 2:26