Ethereal-dev: Re: [Ethereal-dev] Re: [Ethereal-cvs] rev 17504: /trunk/gtk/: main.c

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Gerald Combs <gerald@xxxxxxxxxxxx>
Date: Tue, 07 Mar 2006 16:15:21 -0600
Ulf Lamping wrote:
> gerald@xxxxxxxxxxxx wrote:
>> User: gerald
>> Date: 2006/03/07 01:11 PM
>>
>> Log:
>>  Fix Coverity run 12 CID 61:  In
>> main_cf_cb_live_capture_update_started(),
>>  make sure capture_opts isn't NULL before we try to use it.
>>
>>   
> Could someone tell me, what this is for?
> 
> I only see another line of code added to make a dumb tool happy (which
> can't detect if the function is called with a NULL pointer) or a dumb
> line of code added to make a smart tool dumb (the function *is* probably
> called with a NULL pointer but we just don't get it).
> 
> Either way, the "fix" done isn't a good idea IMHO.

It was ostensibly to validate the input of a function.  In reality it
fixed a problem Coverity wasn't complaining about.  The real problem was
that it may have been possible to pass a NULL value to
get_interface_descriptive_name().  Fixed in r17513.