You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
721 B

  1. diff -up imap-2007e/src/c-client/rfc822.c.overflow imap-2007e/src/c-client/rfc822.c
  2. --- imap-2007e/src/c-client/rfc822.c.overflow 2008-12-12 11:08:26.000000000 -0600
  3. +++ imap-2007e/src/c-client/rfc822.c 2009-07-07 19:27:20.057772757 -0500
  4. @@ -384,6 +384,9 @@ void rfc822_parse_content (BODY *body,ST
  5. if (CHR (bs) == '\012'){/* following LF? */
  6. c = SNX (bs); i--; /* yes, slurp it */
  7. }
  8. + if (!i) /* Make sure we don't get an overflow for */
  9. + break; /* messages ending on \015 (or the following */
  10. + /* i-- will cause i to be MAXINT. Not good.) */
  11. case '\012': /* at start of a line, start with -- ? */
  12. if (!(i && i-- && ((c = SNX (bs)) == '-') && i-- &&
  13. ((c = SNX (bs)) == '-'))) break;