Wireshark mailing list archives
Is "tcp.len < -1" a valid display filter?
From: Stig Bjørlykke <stig () bjorlykke org>
Date: Thu, 27 Oct 2011 08:28:43 +0200
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:
___________________________________________________________________________ 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-request () wireshark org?subject=unsubscribe
Current thread:
- Is "tcp.len < -1" a valid display filter? Stig Bjørlykke (Oct 26)
- Re: Is "tcp.len < -1" a valid display filter? Stephen Fisher (Oct 27)
- Re: Is "tcp.len < -1" a valid display filter? Stig Bjørlykke (Oct 28)
- Re: Is "tcp.len < -1" a valid display filter? Stephen Fisher (Oct 28)
- Re: Is "tcp.len < -1" a valid display filter? Stig Bjørlykke (Oct 28)
- Re: Is "tcp.len < -1" a valid display filter? Guy Harris (Oct 28)
- Re: Is "tcp.len < -1" a valid display filter? Stig Bjørlykke (Oct 28)
- Re: Is "tcp.len < -1" a valid display filter? Stephen Fisher (Oct 27)