git-svn: trunk@3037
Nigel Horne authored on 2007/04/24 22:37:55... | ... |
@@ -2434,6 +2434,10 @@ parseEmailBody(message *messageIn, text *textIn, mbox_ctx *mctx, unsigned int re |
2434 | 2434 |
&aText, recursion_level); |
2435 | 2435 |
if((rc == OK_ATTACHMENTS_NOT_SAVED) && (old_rc == OK)) |
2436 | 2436 |
rc = OK; |
2437 |
+ if(messages[multiparts]) { |
|
2438 |
+ messageDestroy(messages[multiparts]); |
|
2439 |
+ messages[multiparts] = NULL; |
|
2440 |
+ } |
|
2437 | 2441 |
--multiparts; |
2438 | 2442 |
if(rc == VIRUS) |
2439 | 2443 |
infected = TRUE; |
... | ... |
@@ -2796,6 +2800,14 @@ parseEmailBody(message *messageIn, text *textIn, mbox_ctx *mctx, unsigned int re |
2796 | 2796 |
if(!isBounceStart(lineGetData(l))) |
2797 | 2797 |
continue; |
2798 | 2798 |
|
2799 |
+ lookahead = t->t_next; |
|
2800 |
+ if(lookahead) { |
|
2801 |
+ if(isBounceStart(lineGetData(lookahead->t_line))) |
|
2802 |
+ /* don't save worthless header lines */ |
|
2803 |
+ continue; |
|
2804 |
+ } else /* don't save a single liner */ |
|
2805 |
+ break; |
|
2806 |
+ |
|
2799 | 2807 |
/* |
2800 | 2808 |
* We've found what looks like the start of a bounce |
2801 | 2809 |
* message. Only bother saving if it really is a bounce |
... | ... |
@@ -2803,7 +2815,7 @@ parseEmailBody(message *messageIn, text *textIn, mbox_ctx *mctx, unsigned int re |
2803 | 2803 |
* messages that have lots of bounces within bounces in |
2804 | 2804 |
* them |
2805 | 2805 |
*/ |
2806 |
- for(lookahead = t->t_next; lookahead; lookahead = lookahead->t_next) { |
|
2806 |
+ for(; lookahead; lookahead = lookahead->t_next) { |
|
2807 | 2807 |
l = lookahead->t_line; |
2808 | 2808 |
|
2809 | 2809 |
if(l == NULL) |