[jitsi-dev] ChannelNumberAttribute decoding bug


#1

Hi,

Just found this little bug while using it for TURN.
*Problem*: In decodeAttributeBody function it should be 'offset' instead of
0 in this code:
channelNumber =
            ((char) ((attributeValue[0] << 8)
                > (attributeValue[1] & 0xFF)));

Please find patch attached for it. Also added a function to check its range.

Regards,
*Aakash Garg*

ChannelNoAttribute.patch (2.36 KB)


#2

Hi Aakash,

···

On Mon, Jun 9, 2014 at 2:48 AM, Aakash Garg <aakashgargnsit@gmail.com> wrote:

Hi,

Just found this little bug while using it for TURN.
Problem: In decodeAttributeBody function it should be 'offset' instead of 0
in this code:
channelNumber =
            ((char) ((attributeValue[0] << 8)
                > (attributeValue[1] & 0xFF)));

Please find patch attached for it. Also added a function to check its range.

Regards,
Aakash Garg

Thanks for the patch ! It's now commited.

Cheers,
Pawel