Wireshark-dev: Re: [Wireshark-dev] [Wireshark-commits] rev 36503: /trunk/ /trunk/: tap-icmpstat
From: "Maynard, Chris" <Christopher.Maynard@xxxxxxxxx>
Date: Wed, 6 Apr 2011 22:18:33 -0400
Stephen, thanks fixing the bug found by Coverity.  I added the assignment of min_msecs after some testing when I realized it was always 0, but obviously stuck it in the wrong place.

But you also changed g_malloc0() to g_try_malloc0(); however, that function wasn't available until glib 2.8.  Should we change it back, or is it perhaps time to increase the minimum required glib version?

- Chris
________________________________________
From: wireshark-commits-bounces@xxxxxxxxxxxxx [wireshark-commits-bounces@xxxxxxxxxxxxx] On Behalf Of sfisher@xxxxxxxxxxxxx [sfisher@xxxxxxxxxxxxx]
Sent: Wednesday, April 06, 2011 6:51 PM
To: wireshark-commits@xxxxxxxxxxxxx
Subject: [Wireshark-commits] rev 36503: /trunk/ /trunk/: tap-icmpstat.c

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

User: sfisher
Date: 2011/04/06 03:51 PM

Log:
 Fix Coverity 1181: REVERSE_INULL & improve code:

  - Use g_try_malloc0() instead of g_malloc0() since the latter will
    fail and abort the program.  Leave the NULL return check.
  - Don't dereference pointer before checking that it's valid.

Directory: /trunk/
  Changes    Path              Action
  +4 -2      tap-icmpstat.c    Modified
CONFIDENTIALITY NOTICE: The contents of this email are confidential
and for the exclusive use of the intended recipient. If you receive this
email in error, please delete it from your system immediately and 
notify us either by email, telephone or fax. You should not copy,
forward, or otherwise disclose the content of the email.