git-svn-id: file:///var/lib/svn/clamav-devel/trunk/clamav-devel@1085 77e5149b-7576-45b1-b177-96237e5ba77b
Nigel Horne authored on 2004/11/12 18:05:18... | ... |
@@ -1,3 +1,7 @@ |
1 |
+Fri Nov 12 09:05:15 GMT 2004 (njh) |
|
2 |
+---------------------------------- |
|
3 |
+ * libclamav/message.c: Parse some malformed binhex files |
|
4 |
+ |
|
1 | 5 |
Thu Nov 11 22:17:31 GMT 2004 (njh) |
2 | 6 |
---------------------------------- |
3 | 7 |
* libclamav: Rewrote the parsing of headers to improve folded lines |
... | ... |
@@ -17,6 +17,9 @@ |
17 | 17 |
* |
18 | 18 |
* Change History: |
19 | 19 |
* $Log: message.c,v $ |
20 |
+ * Revision 1.114 2004/11/12 09:03:26 nigelhorne |
|
21 |
+ * Parse some malformed binhex files |
|
22 |
+ * |
|
20 | 23 |
* Revision 1.113 2004/11/11 22:15:46 nigelhorne |
21 | 24 |
* Rewrite handling of folded headers |
22 | 25 |
* |
... | ... |
@@ -336,7 +339,7 @@ |
336 | 336 |
* uuencodebegin() no longer static |
337 | 337 |
* |
338 | 338 |
*/ |
339 |
-static char const rcsid[] = "$Id: message.c,v 1.113 2004/11/11 22:15:46 nigelhorne Exp $"; |
|
339 |
+static char const rcsid[] = "$Id: message.c,v 1.114 2004/11/12 09:03:26 nigelhorne Exp $"; |
|
340 | 340 |
|
341 | 341 |
#if HAVE_CONFIG_H |
342 | 342 |
#include "clamav-config.h" |
... | ... |
@@ -1219,7 +1222,7 @@ messageIsEncoding(message *m) |
1219 | 1219 |
(line[9] == ' '))) |
1220 | 1220 |
m->uuencode = m->body_last; |
1221 | 1221 |
else if((m->binhex == NULL) && |
1222 |
- (strncasecmp(line, binhex, sizeof(binhex) - 1) == 0)) |
|
1222 |
+ (simil(line, binhex) > 90)) |
|
1223 | 1223 |
m->binhex = m->body_last; |
1224 | 1224 |
else if((m->yenc == NULL) && (strncmp(line, "=ybegin line=", 13) == 0)) |
1225 | 1225 |
m->yenc = m->body_last; |
... | ... |
@@ -2662,7 +2665,7 @@ static int push(LINK1 *top, const char *string); |
2662 | 2662 |
static int pop(LINK1 *top, char *buffer); |
2663 | 2663 |
static unsigned int compare(char *ls1, char **rs1, char *ls2, char **rs2); |
2664 | 2664 |
|
2665 |
-#define MAX_PATTERN_SIZ 40 /* maximum string lengths */ |
|
2665 |
+#define MAX_PATTERN_SIZ 50 /* maximum string lengths */ |
|
2666 | 2666 |
|
2667 | 2667 |
static int |
2668 | 2668 |
simil(const char *str1, const char *str2) |