Wireshark-commits: [Wireshark-commits] rev 48490: /trunk/epan/dissectors/ /trunk/epan/dissectors/:

Date: Fri, 22 Mar 2013 23:18:31 GMT
http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=48490

User: guy
Date: 2013/03/22 04:18 PM

Log:
 Try to handle lines with NULs in them.  They aren't valid lines, but at
 least one fuzzed capture contains them, and using ep_strndup() to copy
 the line means that the actual amount of memory allocated for the copy
 will be less than the length of the line, and code that parses the line
 assuming that there are value_len+1 bytes in the buffer (including the
 terminating NUL), such as the current parsing code, will break.
 
 We should really have code in Wireshark to handle counted strings, and
 have those be what we extract from packets.  (And we should handle
 non-UTF-8/non-UTF-16 encodings, and octet sequences that aren't valid
 strings for their encoding, and handle display of invalid strings and
 non-printable characters, and....).
 
 Use g_ascii_ versions of various isXXX() and to{upper,lower}(), so we
 don't get surprised by the behavior of the user's locale.

Directory: /trunk/epan/dissectors/
  Changes    Path             Action
  +14 -4     packet-http.c    Modified