[ovs-dev] [PATCH] cfm: Avoid null pointer dereference in cfm_process_heartbeat().

Ben Pfaff blp at nicira.com
Mon May 14 16:46:20 UTC 2012


Thanks, I pushed this to master and 1.7.

Clang gave me more than half false positives, which is not so bad as
such tools go.  I used the version in Debian squeeze, though, which I
imagine to be pretty out of date.

The nice thing about clang was that it was very easy to use, about as
easy as sparse.

On Sun, May 13, 2012 at 05:43:29PM -0700, Ethan Jackson wrote:
> Looks good thanks,
>  Found by clang.
> 
> How is clang btw?  Last time I tried it I got a ton of false positives.
> 
> Ethan
> 
> >
> > Signed-off-by: Ben Pfaff <blp at nicira.com>
> > ---
> >  lib/cfm.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/lib/cfm.c b/lib/cfm.c
> > index c2e2a6c..41a27a0 100644
> > --- a/lib/cfm.c
> > +++ b/lib/cfm.c
> > @@ -606,7 +606,7 @@ cfm_process_heartbeat(struct cfm *cfm, const struct ofpbuf *p)
> >         if (ccm_rdi) {
> >             cfm_fault |= CFM_FAULT_RDI;
> >             VLOG_DBG("%s: RDI bit flagged from RMP %"PRIu64, cfm->name,
> > -                     rmp->mpid);
> > +                     ccm_mpid);
> >         }
> >
> >         VLOG_DBG("%s: received CCM (seq %"PRIu32") (mpid %"PRIu64")"
> > --
> > 1.7.2.5
> >
> > _______________________________________________
> > dev mailing list
> > dev at openvswitch.org
> > http://openvswitch.org/mailman/listinfo/dev



More information about the dev mailing list