Jeff Morriss wrote:
Maynard, Chris wrote:
-----Original Message-----
From: [email protected] [mailto:wireshark-
[email protected]] On Behalf Of [email protected]
Sent: Tuesday, May 17, 2011 12:08 PM
To: [email protected]
Subject: [Wireshark-commits] rev 37201: /trunk/epan/dissectors/
/trunk/epan/dissectors/: packet-ncp2222.inc

http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=37201

User: morriss
Date: 2011/05/17 09:07 AM

Log:
 Avoid passing a NULL string pointer to format routines: some libc's
(e.g.,
 Solaris') will seg-fault on that.

Directory: /trunk/epan/dissectors/
  Changes    Path                  Action
  +8 -4      packet-ncp2222.inc    Modified


Would it be better to use val_to_str() or val_to_str_const() in cases such as this?

Yes, either would probably work here: NCP2222's get_string() (which is used to generate the string most of the time) also returns ep_alloc'd memory (as val_to_str() may).

And anyway, most can be replaced with the _const version.

... which I'll work on. Found a few more unprotected match_strval()s in there at the same time. :-)

Thanks for the pointer!
___________________________________________________________________________
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

Reply via email to