Sophie

Sophie

distrib > Mandriva > 2009.1 > i586 > media > main-release-src > by-pkgid > ea6f8d48a86b8bc5e746131fd27ccbb5 > files > 5

c-client-2007e-1mdv2009.1.src.rpm

--- src/c-client/rfc822.c	2008-12-12 18:08:26.000000000 +0100
+++ src/c-client/rfc822.c.oden	2009-01-14 00:03:45.000000000 +0100
@@ -384,6 +384,9 @@ void rfc822_parse_content (BODY *body,ST
 	if (CHR (bs) == '\012'){/* following LF? */
 	  c = SNX (bs); i--;	/* yes, slurp it */
 	}
+	if (!i)			/* Make sure we don't get an overflow for */
+	  break;		/* messages ending on \015 (or the following */
+				/* i-- will cause i to be MAXINT. Not good.) */
       case '\012':		/* at start of a line, start with -- ? */
 	if (!(i && i-- && ((c = SNX (bs)) == '-') && i-- &&
 	      ((c = SNX (bs)) == '-'))) break;