Joerg Mayer wrote: > On Wed, May 13, 2009 at 12:37:58PM +0200, Stig Bj?rlykke wrote: >> We have some warnings in airpcap_dlg.c where we check an unsigned >> variable against a define with value zero. >> Any ideas how we should fix this? Removing the check is not what I wanted. > > I'm not sure I understand what that code is intended to do, but it seems > that the whole code was written with the (incorrect) assumption of > SSID == "some sort of string" in mind. I don't think that it is possible > to enter an SSID that contains a Zero-byte in the middle.
airpdcap.c uses uri_str_to_bytes() to build a GByteArray from the SSID string. You should be able to use "%00" to represent a zero byte. This also applies to the passphrase. > The code in question does something even more interesting: It tests > whether the length of the entered SSID is < 0. So removing that test > doesn't introduce any problems. We use a zero-length SSID to repesent a "wildcard" SSID. Otherwise the length should be > 0 as far as I know. It should be safe to remove the test. ___________________________________________________________________________ Sent via: Wireshark-dev mailing list <[email protected]> Archives: http://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev mailto:[email protected]?subject=unsubscribe
