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

LifetimeAttribute decodes incorrect location in message bytes #20

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

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. connection using a turn server relay
2.
3.

What is the expected output? What do you see instead?
expected turn allocation timeout from turn server is suppose to be 600 for 10 
minutes but instead read it as a huge number instead.


What version of the product are you using? On what operating system?
latest


Please provide any additional information below.

method decodeAttributeBody in class LifetimeAttribute is reading the wrong byte 
offset, hard-coded to be from zero.
should be changed to 

lifetime = ((attributeValue[offset] << 24) & 0xff000000) +
            ((attributeValue[offset+1] << 16) & 0x00ff0000) +
            ((attributeValue[offset+2] << 8) & 0x0000ff00) +
            (attributeValue[offset+3] & 0x000000ff);

Original issue reported on code.google.com by [email protected] on 20 May 2014 at 10:31

Attachments:

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