Sophie

Sophie

distrib > Mandriva > 2007.1 > i586 > by-pkgid > 837d89df9d9034c7f8d7a1b841e37f65 > files > 4

imap-2006c1-2mdv2007.1.src.rpm

--- imap-2001a/src/c-client/rfc822.c.overflow	Wed Apr 17 22:39:13 2002
+++ imap-2001a/src/c-client/rfc822.c	Wed Apr 17 22:40:25 2002
@@ -610,6 +610,9 @@
 	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-- && ((c = SNX (bs)) == '-') && i-- && ((c = SNX (bs)) == '-')) {
 				/* see if cookie matches */