Browse code

Harden the test for RFC2047 encoded headers

git-svn-id: file:///var/lib/svn/clamav-devel/trunk/clamav-devel@1000 77e5149b-7576-45b1-b177-96237e5ba77b

Nigel Horne authored on 2004/10/15 06:20:25
Showing 2 changed files
... ...
@@ -1,3 +1,7 @@
1
+Thu Oct 14 22:19:20 BST 2004 (njh)
2
+----------------------------------
3
+  * libclamav/mbox.c:	Harden the test for RFC2047 encoded headers
4
+
1 5
 Thu Oct 14 18:46:10 BST 2004 (njh)
2 6
 ----------------------------------
3 7
   * libclamav:		Handle RFC2047 on long lines produced by continuation
... ...
@@ -17,6 +17,9 @@
17 17
  *
18 18
  * Change History:
19 19
  * $Log: mbox.c,v $
20
+ * Revision 1.153  2004/10/14 21:18:49  nigelhorne
21
+ * Harden the test for RFC2047 encoded headers
22
+ *
20 23
  * Revision 1.152  2004/10/14 17:45:13  nigelhorne
21 24
  * RFC2047 on long lines produced by continuation headers
22 25
  *
... ...
@@ -444,7 +447,7 @@
444 444
  * Compilable under SCO; removed duplicate code with message.c
445 445
  *
446 446
  */
447
-static	char	const	rcsid[] = "$Id: mbox.c,v 1.152 2004/10/14 17:45:13 nigelhorne Exp $";
447
+static	char	const	rcsid[] = "$Id: mbox.c,v 1.153 2004/10/14 21:18:49 nigelhorne Exp $";
448 448
 
449 449
 #if HAVE_CONFIG_H
450 450
 #include "clamav-config.h"
... ...
@@ -2540,7 +2543,7 @@ rfc2047(const char *in)
2540 2540
 	char *out, *pout;
2541 2541
 	size_t len;
2542 2542
 
2543
-	if(strstr(in, "=?") == NULL)
2543
+	if((strstr(in, "=?") == NULL) || (strstr(in, "?=") == NULL))
2544 2544
 		return strdup(in);
2545 2545
 
2546 2546
 	cli_dbgmsg("rfc2047 '%s'\n", in);