Date: Tue, 16 Aug 2005 20:31:11 +0400 (MSD) From: Alexey Khlyamkov <bsd@prj.lll.pp.ru> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/84999: [patch] bug in the uulib-0.5.20 Message-ID: <20050816163111.C65DE22A4F@mailer.yarene.elektra.ru> Resent-Message-ID: <200508161640.j7GGeBrf060315@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 84999 >Category: ports >Synopsis: [patch] bug in the uulib-0.5.20 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Aug 16 16:40:11 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Alexey Khlyamkov >Release: >Organization: >Environment: >Description: uudeview's author makes 1023 chars as maximum header line length (see line 167 of uulib/uuscan.c). Handling this limit in the ScanHeaderLine function may skip all header lines after very long splitted line because of finding CR in the truncated string (at ptr) instead of scan source stream (uugen_inbuffer). >How-To-Repeat: Almost any e-mail message can be used which contains very long (longer than 1023) header field (e.g. "To:" with many recipients) before fields sensitive for parsing message by uulib. >Fix: Patch attached can be used in the ports project (patch prepared to placing it to the ports/converters/uulib/files/ directory) --- patch-ae begins here --- --- uulib/uuscan.c.orig Tue Mar 2 01:52:27 2004 +++ uulib/uuscan.c Sun Jul 3 16:50:37 2005 @@ -251,8 +251,9 @@ /* * see if line was terminated with CR. Otherwise, it continues ... */ - c = strlen (ptr); - if (c>0 && (ptr[c-1] == '\012' || ptr[c-1] == '\015')) + c = strlen (uugen_inbuffer); + if (c>0 && + (uugen_inbuffer[c-1] == '\012' || uugen_inbuffer[c-1] == '\015')) hadcr = 1; else hadcr = 0; @@ -261,6 +262,7 @@ * strip whitespace */ + c = strlen (ptr); ptr += c; llength += c; while (llength && isspace(*(ptr-1))) { --- patch-ae ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050816163111.C65DE22A4F>