-- Start of PGP signed section.
[ Charset UTF-8 unsupported, converting... ]
> On 18.05.2017 03:49, Rodney W. Grimes wrote:
> > [ Charset UTF-8 unsupported, converting... ]
> >> Author: ae
> >> Date: Wed May 17 10:56:22 2017
> >> New Revision: 318400
> >> URL: https://svnweb.freebsd.org/changeset/base/318400
> >>
> >> Log:
> >>   Allow zero port specification in table entries with type flow.
> >>   
> >>   PR:              217620
> >>   MFC after:       1 week
> >>
> >> Modified:
> >>   head/sbin/ipfw/tables.c
> >>
> >> Modified: head/sbin/ipfw/tables.c
> >> ==============================================================================
> >> --- head/sbin/ipfw/tables.c        Wed May 17 09:04:09 2017        
> >> (r318399)
> >> +++ head/sbin/ipfw/tables.c        Wed May 17 10:56:22 2017        
> >> (r318400)
> >> @@ -1260,16 +1260,14 @@ tentry_fill_key_type(char *arg, ipfw_obj
> >>                    if ((p = strchr(arg, ',')) != NULL)
> >>                            *p++ = '\0';
> >>  
> >> -                  if ((port = htons(strtol(arg, NULL, 10))) == 0) {
> >> +                  port = htons(strtol(arg, &pp, 10));
> >                                                       ^^^
> > Can this be converted to a sizeof(foo) somehow?
> > Constants like this are typically bad style and lead to bugs.
> 
> This means that decimal number is expected in the string.
> Not sure what bugs this can lead to.

Ignore me, my brain was reading strtok as strncpy and expecting
the third argument to be length limit.

-- 
Rod Grimes                                                 rgri...@freebsd.org
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to