[ovs-dev] [PATCH] ofp-parse: Correctly report error parsing selection method parameter.

Ben Pfaff blp at nicira.com
Mon Apr 27 15:07:48 UTC 2015


Thanks, I applied this to master.

On Mon, Apr 27, 2015 at 09:44:14AM +0800, Kevin Lo wrote:
> Acked-by: Kevin Lo <kevlo at FreeBSD.org>
> 
> On Sun, Apr 26, 2015 at 10:17:33AM -0700, Ben Pfaff wrote:
> > 
> > Found by LLVM scan-build.
> > 
> > Reported-by: Kevin Lo <kevlo at FreeBSD.org>
> > Signed-off-by: Ben Pfaff <blp at nicira.com>
> > ---
> >  lib/ofp-parse.c | 3 +++
> >  1 file changed, 3 insertions(+)
> > 
> > diff --git a/lib/ofp-parse.c b/lib/ofp-parse.c
> > index 8fce546..46212f6 100644
> > --- a/lib/ofp-parse.c
> > +++ b/lib/ofp-parse.c
> > @@ -1409,6 +1409,9 @@ parse_ofp_group_mod_str__(struct ofputil_group_mod *gm, uint16_t command,
> >                  goto out;
> >              }
> >              error = str_to_u64(value, &gm->props.selection_method_param);
> > +            if (error) {
> > +                goto out;
> > +            }
> >              *usable_protocols &= OFPUTIL_P_OF15_UP;
> >          } else if (!strcmp(name, "fields")) {
> >              if (!(fields & F_GROUP_TYPE)) {
> > -- 
> > 2.1.3
> > 
> > 



More information about the dev mailing list