[libvirt] [PATCH 3/7] nwfilter_ebiptables_driver.c: avoid NULL dereference

2010-04-14 Thread Jim Meyering
From: Jim Meyering * src/nwfilter/nwfilter_ebiptables_driver.c (ebiptablesApplyNewRules): Don't dereference a NULL or uninitialized pointer when given an empty list of rules. Add an sa_assert(inst) in each loop to tell clang that the uses of "inst[i]" are valid. --- src/nwfilter/nwfilter_ebipta

Re: [libvirt] [PATCH 3/7] nwfilter_ebiptables_driver.c: avoid NULL dereference

2010-04-14 Thread Eric Blake
On 04/14/2010 10:02 AM, Jim Meyering wrote: > From: Jim Meyering > > * src/nwfilter/nwfilter_ebiptables_driver.c (ebiptablesApplyNewRules): > Don't dereference a NULL or uninitialized pointer when given > an empty list of rules. Add an sa_assert(inst) in each loop to > tell clang that the uses o

Re: [libvirt] [PATCH 3/7] nwfilter_ebiptables_driver.c: avoid NULL dereference

2010-04-14 Thread Daniel P. Berrange
On Wed, Apr 14, 2010 at 06:02:32PM +0200, Jim Meyering wrote: > From: Jim Meyering > > * src/nwfilter/nwfilter_ebiptables_driver.c (ebiptablesApplyNewRules): > Don't dereference a NULL or uninitialized pointer when given > an empty list of rules. Add an sa_assert(inst) in each loop to > tell cla

Re: [libvirt] [PATCH 3/7] nwfilter_ebiptables_driver.c: avoid NULL dereference

2010-04-14 Thread Stefan Berger
libvir-list-boun...@redhat.com wrote on 04/14/2010 01:40:17 PM: > Please respond to "Daniel P. Berrange" > > On Wed, Apr 14, 2010 at 06:02:32PM +0200, Jim Meyering wrote: > > From: Jim Meyering > > > > * src/nwfilter/nwfilter_ebiptables_driver.c (ebiptablesApplyNewRules): > > Don't dereference

Re: [libvirt] [PATCH 3/7] nwfilter_ebiptables_driver.c: avoid NULL dereference

2010-04-14 Thread Matthias Bolte
2010/4/15 Stefan Berger : > > libvir-list-boun...@redhat.com wrote on 04/14/2010 01:40:17 PM: > > >> Please respond to "Daniel P. Berrange" >> >> On Wed, Apr 14, 2010 at 06:02:32PM +0200, Jim Meyering wrote: >> > From: Jim Meyering >> > >> > * src/nwfilter/nwfilter_ebiptables_driver.c (ebiptablesA

Re: [libvirt] [PATCH 3/7] nwfilter_ebiptables_driver.c: avoid NULL dereference

2010-04-14 Thread Stefan Berger
Matthias Bolte wrote on 04/14/2010 08:20:22 PM: > "Daniel P. Berrange", libvir-list > > 2010/4/15 Stefan Berger : > > > > libvir-list-boun...@redhat.com wrote on 04/14/2010 01:40:17 PM: > > > > > >> Please respond to "Daniel P. Berrange" > >> > >> On Wed, Apr 14, 2010 at 06:02:32PM +0200, Jim

Re: [libvirt] [PATCH 3/7] nwfilter_ebiptables_driver.c: avoid NULL dereference

2010-04-14 Thread Jim Meyering
Stefan Berger wrote: > libvir-list-boun...@redhat.com wrote on 04/14/2010 01:40:17 PM: > >> Please respond to "Daniel P. Berrange" >> >> On Wed, Apr 14, 2010 at 06:02:32PM +0200, Jim Meyering wrote: >> > From: Jim Meyering >> > >> > * src/nwfilter/nwfilter_ebiptables_driver.c (ebiptablesApplyNewRu

Re: [libvirt] [PATCH 3/7] nwfilter_ebiptables_driver.c: avoid NULL dereference

2010-04-14 Thread Jim Meyering
Matthias Bolte wrote: ... >>> >      for (i = 0; i < nruleInstances; i++) >>> > +        sa_assert (inst); >> >> >> Due to this statement here I get segmentation faults for which there is no >> reason. I have no idea why that is but I have to deactivate this line for it >> to work again. >> The sam

Re: [libvirt] [PATCH 3/7] nwfilter_ebiptables_driver.c: avoid NULL dereference

2010-04-15 Thread Stefan Berger
Jim Meyering wrote on 04/15/2010 01:36:21 AM: > "Daniel P. Berrange", libvir-list > > Stefan Berger wrote: > > libvir-list-boun...@redhat.com wrote on 04/14/2010 01:40:17 PM: > > > >> Please respond to "Daniel P. Berrange" > >> > >> On Wed, Apr 14, 2010 at 06:02:32PM +0200, Jim Meyering wrote:

Re: [libvirt] [PATCH 3/7] nwfilter_ebiptables_driver.c: avoid NULL dereference

2010-04-15 Thread Jim Meyering
Stefan Berger wrote: >> If it's not 0, then you must have one of these two envvars set: >> >> test -n "$CCC_ANALYZER_ANALYSIS$COVERITY_BUILD_COMMAND" && echo oops > > got 'oops' here. That is surprising (esp. since your definition of STATIC_ANALYSIS was 0). You get that on the command line? Whic

Re: [libvirt] [PATCH 3/7] nwfilter_ebiptables_driver.c: avoid NULL dereference

2010-04-15 Thread Stefan Berger
Jim Meyering wrote on 04/15/2010 09:47:53 AM: > "Daniel P. Berrange", libvir-list > > Stefan Berger wrote: > >> If it's not 0, then you must have one of these two envvars set: > >> > >> test -n "$CCC_ANALYZER_ANALYSIS$COVERITY_BUILD_COMMAND" && echo oops > > > > got 'oops' here. > > That is