Wireshark-dev: Re: [Wireshark-dev] [Wireshark-commits] rev 19777: /trunk/ /trunk/: capture-pcap
From: Ulf Lamping <[email protected]>
Date: Mon, 06 Nov 2006 23:30:12 +0100
[email protected] wrote:
http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=19777

User: jmayer
Date: 2006/11/02 09:45 AM

Log:
 Frederic Heem:
  Fix some memleaks and overflows.
I haven't committed the changes that are not bug fixes.
Directory: /trunk/
  Changes    Path                   Action
  +1 -0      capture-pcap-util.c    Modified
  +24 -2     capture_loop.c         Modified
  +2 -0      capture_opts.c         Modified
  +14 -9     dumpcap.c              Modified
Hi Jörg!

What are the reasons of the following changes in capture_loop.c:

if(pipename == NULL){

pipename cannot be NULL - if it's NULL that's a bug at the caller and should be fixed there
if(ld->pcap_h){

ld->pcap_h cannot be NULL - if it's NULL that's a bug and needs to be investigated, as that would indicate a serious problem in the code
if(capture_opts == NULL){

capture_opts cannot be NULL - if it's NULL that's a bug at the caller and should be fixed there
capture_opts->save_file = NULL;

what's the reason to do it here, the same is done again three lines later (as you can see already see in the patch)

These places look bogus and should be reverted, unless there are good reasons that I don't see ...
Regards, ULFL