Hi.

On a 32-bit system the display filter "tcp.len < -1" seems to be
valid, and does return all TCP packets.

This happens because we use strtoul() to convert the string "-1" to a
unsigned long, and the documentation states that "the string is
converted to an unsigned long value in the obvious manner".  I suppose
this means that the value is casted from signed to unsigned without a
warning.

The attached patch fixes this, but can we do this check in a simpler manner?


-- 
Stig Bjørlykke

Attachment: signed-unsigned-integer.patch
Description: Binary data

___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@wireshark.org>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe

Reply via email to