Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DATA_INDICATION encode error with STUN(TURN) #25

Open
GoogleCodeExporter opened this issue Feb 17, 2016 · 0 comments
Open

DATA_INDICATION encode error with STUN(TURN) #25

GoogleCodeExporter opened this issue Feb 17, 2016 · 0 comments

Comments

@GoogleCodeExporter
Copy link

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 [email protected] on 24 Nov 2014 at 2:26

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant