Wireshark mailing list archives

Re: [Wireshark-commits] rev 30846: /trunk/gtk/ /trunk/gtk/: capture_if_dlg.c


From: Guy Harris <guy () alum mit edu>
Date: Fri, 6 Nov 2009 23:07:25 -0800


On Nov 6, 2009, at 10:09 AM, gerald () wireshark org wrote:

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

User: gerald
Date: 2009/11/06 10:09 AM

Log:
Add some null pointer checks. This is a blind attempt to fix bug 4155.

Note that pcap_findalldevs() is not specified as guaranteeing that all  
interfaces have a non-null description field.

A quick look at the WinPcap 4.1.1 code doesn't seem to show any way  
for any interfaces to have a null description field on Windows, but  
perhaps I'm missing something.  In any case, the checks for a null  
pointer probably still belong there, just in case, in the future,  
pcap_findalldevs() can return an interface with a null description  
field.

However, if the description field is null, no () will be printed.  If  
it points to a null *string*, () will be printed - but you won't get a  
null-pointer dereference in that case.
___________________________________________________________________________
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: