http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=23623
User: guy
Date: 2007/11/27 06:53 PM
Log:
strcasecmp(), strncasecmp(), g_strcasecmp(), and g_strncasecmp() delenda
est. Use g_ascii_strcasecmp() and g_ascii_strncasecmp(), and supply our
own versions if they're missing from GLib (as is the case with GLib
1.x).
In the code to build the list of named fields for Diameter, don't use
g_strdown(); do our own g_ascii_-style upper-case to lower-case mapping
in the hash function and use g_ascii_strcasecmp() in the compare
function.
We do this because there is no guarantee that toupper(), tolower(), and
functions that use them will, for example, map between "I" and "i" in
all locales; in Turkish locales, for example, there are, in both
upper case and lower case, versions of "i" with and without a dot, and
the upper-case version of "i" is "I"-with-a-dot and the lower-case
version of "I" is "i"-without-a-dot. This causes strings that should
match not to match.
This finishes fixing bug 2010 - an earlier checkin prevented the crash
(as there are other ways to produce the same crash, e.g. a bogus
dictionary.xml file), but didn't fix the case-insensitive string matching.
Directory: /trunk/epan/crypt/
Changes Path Action
+7 -3 airpdcap.c Modified
Directory: /trunk/epan/dfilter/
Changes Path Action
+7 -3 semcheck.c Modified
Directory: /trunk/epan/dissectors/
Changes Path Action
+5 -1 packet-3com-njack.c Modified
+8 -4 packet-afp.c Modified
+8 -4 packet-cigi.c Modified
+33 -8 packet-diameter.c Modified
+5 -1 packet-edonkey.c Modified
+5 -1 packet-giop.c Modified
+9 -5 packet-http.c Modified
+5 -1 packet-ieee80211.c Modified
+6 -2 packet-ipsec.c Modified
(46 files not shown)