git-svn-id: file:///var/lib/svn/clamav-devel/trunk/clamav-devel@1392 77e5149b-7576-45b1-b177-96237e5ba77b
Nigel Horne authored on 2005/03/16 03:12:10... | ... |
@@ -15,7 +15,7 @@ |
15 | 15 |
* along with this program; if not, write to the Free Software |
16 | 16 |
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
17 | 17 |
*/ |
18 |
-static char const rcsid[] = "$Id: message.c,v 1.147 2005/03/07 11:23:12 nigelhorne Exp $"; |
|
18 |
+static char const rcsid[] = "$Id: message.c,v 1.148 2005/03/15 18:12:10 nigelhorne Exp $"; |
|
19 | 19 |
|
20 | 20 |
#if HAVE_CONFIG_H |
21 | 21 |
#include "clamav-config.h" |
... | ... |
@@ -847,6 +847,10 @@ messageAddStr(message *m, const char *data) |
847 | 847 |
m->body_last = m->body_first = (text *)cli_malloc(sizeof(text)); |
848 | 848 |
else { |
849 | 849 |
assert(m->body_last != NULL); |
850 |
+ if((data == NULL) && (m->body_last->t_line == NULL)) { |
|
851 |
+ cli_dbgmsg("not saving two blank lines in sucession"); |
|
852 |
+ return 1; |
|
853 |
+ } |
|
850 | 854 |
m->body_last->t_next = (text *)cli_malloc(sizeof(text)); |
851 | 855 |
if(m->body_last->t_next == NULL) { |
852 | 856 |
messageDedup(m); |