Browse code

Better handling of more than one disposition type in an email

git-svn: trunk@1548

Nigel Horne authored on 2005/05/16 00:49:55
Showing 2 changed files
... ...
@@ -1,3 +1,11 @@
1
+Sun May 15 16:47:48 BST 2005 (njh)
2
+----------------------------------
3
+  * libclamav/message.c:	Fixed a problem where an email with more
4
+					than one content-disposition type line,
5
+					one or more of which was empty, could
6
+					crash libclamav. Reported by arnaud at
7
+					clamav.net.
8
+
1 9
 Sat May 14 17:14:52 BST 2005 (njh)
2 10
 ----------------------------------
3 11
   * libclamav/pdf.c:	Fix problem with munmap not unmapping all the area,
... ...
@@ -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.155 2005/05/11 15:22:17 nigelhorne Exp $";
18
+static	char	const	rcsid[] = "$Id: message.c,v 1.156 2005/05/15 15:46:12 nigelhorne Exp $";
19 19
 
20 20
 #if HAVE_CONFIG_H
21 21
 #include "clamav-config.h"
... ...
@@ -359,7 +359,8 @@ messageSetDispositionType(message *m, const char *disptype)
359 359
 		m->mimeDispositionType = strdup(disptype);
360 360
 		if(m->mimeDispositionType)
361 361
 			strstrip(m->mimeDispositionType);
362
-	}
362
+	} else
363
+		m->mimeDispositionType = NULL;
363 364
 }
364 365
 
365 366
 const char *