The following reply was made to PR kern/107565; it has been noted by GNATS.
From: Igor Anishchuk <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED], [EMAIL PROTECTED]
Cc:
Subject: Re: kern/107565: [ipfw] [patch] input string parsing mistake
Date: Fri, 5 Jan 2007 23:44:02 +0200
Quoted-printable suxx! 3rd turn. Excuse me. Could anybody remove or 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)
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ipfw
To unsubscribe, send any mail to "[EMAIL PROTECTED]"