blob: 48e473fcae5379664b437eac3e224737d78b2c36 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
--- a/src/c-client/rfc822.c
+++ b/src/c-client/rfc822.c
@@ -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;
|