Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Jan 2007 22:00:40 GMT
From:      Igor Anishchuk <igor@nw-plus.com>
To:        freebsd-ipfw@FreeBSD.org
Subject:   Re: kern/107565: [ipfw] [patch] input string parsing mistake
Message-ID:  <200701052200.l05M0eAX035771@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/107565; it has been noted by GNATS.

From: Igor Anishchuk <igor@nw-plus.com>
To: bug-followup@FreeBSD.org, igor.anishchuk@f-secure.com
Cc:  
Subject: Re: kern/107565: [ipfw] [patch] input string parsing mistake
Date: Fri, 5 Jan 2007 22:55:46 +0200

 Quoted-printable suxx! 3rd turn. Excuse me. Could anybody remove and
 edit these messages?
 
 --- /usr/src/sbin/ipfw/ipfw2.c  Fri Jan  5 17:43:25 2007
 ***************
 *** 2720,2725 ****
 --- 2720,2733 ----
         char *p = strpbrk(av, "/:,{");
         int masklen;
         char md;
 +         char t[15];
 +         int ti;
 +
 +         for (ti=0; ti<16 && p && p[ti] != 0; ti++){
 +                 t[ti]=p[ti+1];
 +                 if(t[ti] != '.' && (t[ti] < '0' || t[ti] > '9'))
 +                         t[ti] = '\0';
 +         }
 
         if (p) {
                 md = *p;
 ***************
 *** 2731,2741 ****
                 errx(EX_NOHOST, "hostname ``%s'' unknown", av);
         switch (md) {
         case ':':
 !               if (!inet_aton(p, (struct in_addr *)&d[1]))
                         errx(EX_DATAERR, "bad netmask ``%s''", p);
                 break;
         case '/':
 !               masklen = atoi(p);
                 if (masklen == 0)
                         d[1] = htonl(0);        /* mask */
                 else if (masklen > 32)
 --- 2739,2749 ----
                 errx(EX_NOHOST, "hostname ``%s'' unknown", av);
         switch (md) {
         case ':':
 !               if (!inet_aton(t, (struct in_addr *)&d[1]))
                         errx(EX_DATAERR, "bad netmask ``%s''", p);
                 break;
         case '/':
 !               masklen = atoi(t);
                 if (masklen == 0)
                         d[1] = htonl(0);        /* mask */
                 else if (masklen > 32)
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200701052200.l05M0eAX035771>