[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug in lib/rfc822scan.c
I found a bug in lib/rfc822scan.c.
The bug manifest itself scanning a nested comment with two consecutive ')'
like this:
max (Nested (Comment))
here is a simple patch:
----
*** rfc822scan.c.old Tue Dec 15 19:58:16 1992
--- rfc822scan.c Tue Dec 15 19:58:24 1992
***************
*** 119,125 ****
if (*cp == cstart && type == Comment) {
i = n;
n = _hdr_compound(cp, n, cstart, cend,
! type, tp, tlist, tlistp);
cp = (*tlistp)->t_pname + TOKENLEN(*tlistp) - n;
} else if (*cp == '\\') {
if (n == 1) {
--- 119,125 ----
if (*cp == cstart && type == Comment) {
i = n;
n = _hdr_compound(cp, n, cstart, cend,
! type, tp, tlist, tlistp) +1;
cp = (*tlistp)->t_pname + TOKENLEN(*tlistp) - n;
} else if (*cp == '\\') {
if (n == 1) {
--
+-------------------------------------------------------------------+
|Massimo Fusaro | E-mail: max@sixcom.it |
|Sixtel S.p.A. | X400: c=it;admd=garr;prmd=IUnet;O=sixcom;S=max |
|Milan, Italy | Phone: +39 (2) 3192 216 |
+-------------------------------------------------------------------+