Handle blank lines in text/plain messages

git-svn: trunk@916
remotes/push_mirror/metadata
Nigel Horne 21 years ago
parent 7e49216436
commit 420df63ce5
  1. 4
      clamav-devel/ChangeLog
  2. 11
      clamav-devel/libclamav/line.c
  3. 17
      clamav-devel/libclamav/message.c

@ -1,3 +1,7 @@
Tue Sep 21 15:56:35 BST 2004 (njh)
----------------------------------
* libclamav: Fix handling of empty lines in text/plain emails
Tue Sep 21 13:20:31 BST 2004 (njh)
----------------------------------
* libclamav/mbox.c: Fallback to CURLOPT_FILE if CURLOPT_WRITEDATA isn't

@ -16,6 +16,9 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log: line.c,v $
* Revision 1.4 2004/09/21 14:55:26 nigelhorne
* Handle blank lines in text/plain messages
*
* Revision 1.3 2004/08/25 12:30:36 nigelhorne
* Use memcpy rather than strcpy
*
@ -27,7 +30,7 @@
*
*/
static char const rcsid[] = "$Id: line.c,v 1.3 2004/08/25 12:30:36 nigelhorne Exp $";
static char const rcsid[] = "$Id: line.c,v 1.4 2004/09/21 14:55:26 nigelhorne Exp $";
#if HAVE_CONFIG_H
#include "clamav-config.h"
@ -35,10 +38,15 @@ static char const rcsid[] = "$Id: line.c,v 1.3 2004/08/25 12:30:36 nigelhorne Ex
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include "line.h"
#include "others.h"
#ifndef CL_DEBUG
#define NDEBUG /* map CLAMAV debug onto standard */
#endif
#ifdef OLD
line_t *
lineCreate(const char *data)
@ -104,6 +112,7 @@ lineCreate(const char *data)
line_t *
lineLink(line_t *line)
{
assert(line != NULL);
if(line[0] == 127) {
cli_warnmsg("lineLink: linkcount too large\n");
return NULL;

@ -17,6 +17,9 @@
*
* Change History:
* $Log: message.c,v $
* Revision 1.88 2004/09/21 14:55:26 nigelhorne
* Handle blank lines in text/plain messages
*
* Revision 1.87 2004/09/20 12:44:03 nigelhorne
* Fix parsing error on mime arguments
*
@ -258,14 +261,14 @@
* uuencodebegin() no longer static
*
*/
static char const rcsid[] = "$Id: message.c,v 1.87 2004/09/20 12:44:03 nigelhorne Exp $";
static char const rcsid[] = "$Id: message.c,v 1.88 2004/09/21 14:55:26 nigelhorne Exp $";
#if HAVE_CONFIG_H
#include "clamav-config.h"
#endif
#ifndef CL_DEBUG
/*#define NDEBUG /* map CLAMAV debug onto standard */
#define NDEBUG /* map CLAMAV debug onto standard */
#endif
#ifdef CL_THREAD_SAFE
@ -1591,7 +1594,10 @@ messageToText(message *m)
textDestroy(first);
return NULL;
}
last->t_line = lineLink(t_line->t_line);
if(t_line->t_line)
last->t_line = lineLink(t_line->t_line);
else
last->t_line = NULL; /* empty line */
}
if(last)
last->t_next = NULL;
@ -1624,7 +1630,10 @@ messageToText(message *m)
textDestroy(first);
return NULL;
}
last->t_line = lineLink(t_line->t_line);
if(t_line->t_line)
last->t_line = lineLink(t_line->t_line);
else
last->t_line = NULL; /* empty line */
}
continue;
}

Loading…
Cancel
Save