Re: kern/107565: [ipfw] [patch] input string parsing mistake
Synopsis: [ipfw] [patch] input string parsing mistake State-Changed-From-To: feedback-open State-Changed-By: linimon State-Changed-When: Sat Jan 6 12:38:14 UTC 2007 State-Changed-Why: Feedback received. http://www.freebsd.org/cgi/query-pr.cgi?pr=107565 ___ freebsd-ipfw@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ipfw To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: kern/107565: [ipfw] [patch] input string parsing mistake
Synopsis: [ipfw] [patch] input string parsing mistake State-Changed-From-To: open-feedback State-Changed-By: linimon State-Changed-When: Fri Jan 5 17:00:32 UTC 2007 State-Changed-Why: Unfortunately, you used quoted-printable to include your updated patch, rendering it useless to GNATS. Can you please resend it (preferably also without the HTML cruft? Often that is flagged as spam.) Thanks http://www.freebsd.org/cgi/query-pr.cgi?pr=107565 ___ freebsd-ipfw@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ipfw To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: kern/107565: [ipfw] [patch] input string parsing mistake
The following reply was made to PR kern/107565; it has been noted by GNATS. From: Anishchuk, Igor [EMAIL PROTECTED] To: [EMAIL PROTECTED], Anishchuk, Igor [EMAIL PROTECTED] Cc: Subject: Re: kern/107565: [ipfw] [patch] input string parsing mistake Date: Fri, 5 Jan 2007 22:36:40 +0200 Hello! I've found a little mistake in my workaround. The line for(ti=3D0; ti16 p[ti] !=3D 0; ti++){ should be for (ti=3D0; ti16 p p[ti] !=3D 0; ti++){ Please change is ASAP otherwise segmentation fault will happen in some conditions. The complete, tested patch is: --- /usr/src/sbin/ipfw/ipfw2.c Fri Jan 5 17:43:25 2007 *** *** 2720,2725 --- 2720,2733 char *p =3D strpbrk(av, /:,{); int masklen; char md; + char t[15]; + int ti; + + for (ti=3D0; ti16 p p[ti] !=3D 0; ti++){ + t[ti]=3Dp[ti+1]; + if(t[ti] !=3D '.' (t[ti] '0' || t[ti] '9')) + t[ti] =3D '\0'; + } if (p) { md =3D *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 =3D atoi(p); if (masklen =3D=3D 0) d[1] =3D 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 =3D atoi(t); if (masklen =3D=3D 0) d[1] =3D htonl(0);/* mask */ else if (masklen 32) Thanks! --=20 Igor Anishchuk ___ freebsd-ipfw@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ipfw To unsubscribe, send any mail to [EMAIL PROTECTED]
RE: kern/107565: [ipfw] [patch] input string parsing mistake
Hello! I've resent my last message. Could you please clean up the PR. Is it possible to clean out my personal data from it? I mean my direct e-mail address, at least. Thanks. -- Igor Anishchuk -Original Message- From: Mark Linimon [mailto:[EMAIL PROTECTED] Sent: Friday, January 05, 2007 7:02 PM To: Anishchuk, Igor; [EMAIL PROTECTED]; freebsd-ipfw@FreeBSD.org Subject: Re: kern/107565: [ipfw] [patch] input string parsing mistake Synopsis: [ipfw] [patch] input string parsing mistake State-Changed-From-To: open-feedback State-Changed-By: linimon State-Changed-When: Fri Jan 5 17:00:32 UTC 2007 State-Changed-Why: Unfortunately, you used quoted-printable to include your updated patch, rendering it useless to GNATS. Can you please resend it (preferably also without the HTML cruft? Often that is flagged as spam.) Thanks http://www.freebsd.org/cgi/query-pr.cgi?pr=107565 ___ freebsd-ipfw@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ipfw To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: kern/107565: [ipfw] [patch] input string parsing mistake
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 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; ti16 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) ___ freebsd-ipfw@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ipfw To unsubscribe, send any mail to [EMAIL PROTECTED]