git-svn: trunk@1843
Nigel Horne authored on 2006/02/07 20:35:45... | ... |
@@ -1,3 +1,8 @@ |
1 |
+Tue Feb 7 11:34:17 GMT 2006 (njh) |
|
2 |
+---------------------------------- |
|
3 |
+ * libclamav/message.c: Some Trojan.Downloader.Small-1011 were not |
|
4 |
+ being spotted - reported by Diego |
|
5 |
+ |
|
1 | 6 |
Sun Feb 5 13:56:56 GMT 2006 (njh) |
2 | 7 |
---------------------------------- |
3 | 8 |
* clamav-milter: Added --template-headers option, based on a whishlist |
... | ... |
@@ -1,5 +1,5 @@ |
1 | 1 |
/* |
2 |
- * Copyright (C) 2002 Nigel Horne <njh@bandsman.co.uk> |
|
2 |
+ * Copyright (C) 2002-2006 Nigel Horne <njh@bandsman.co.uk> |
|
3 | 3 |
* |
4 | 4 |
* This program is free software; you can redistribute it and/or modify |
5 | 5 |
* it under the terms of the GNU General Public License as published by |
... | ... |
@@ -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.160 2005/12/10 18:56:35 nigelhorne Exp $"; |
|
18 |
+static char const rcsid[] = "$Id: message.c,v 1.161 2006/02/07 11:35:45 nigelhorne Exp $"; |
|
19 | 19 |
|
20 | 20 |
#if HAVE_CONFIG_H |
21 | 21 |
#include "clamav-config.h" |
... | ... |
@@ -78,6 +78,9 @@ static unsigned char hex(char c); |
78 | 78 |
static unsigned char base64(char c); |
79 | 79 |
static unsigned char uudecode(char c); |
80 | 80 |
static const char *messageGetArgument(const message *m, int arg); |
81 |
+/* |
|
82 |
+ * http://oopweb.com/CPP/Documents/FunctionPointers/Volume/CCPP/callback/callback.html |
|
83 |
+ */ |
|
81 | 84 |
static void *messageExport(message *m, const char *dir, void *(*create)(void), void (*destroy)(void *), void (*setFilename)(void *, const char *, const char *), void (*addData)(void *, const unsigned char *, size_t), void *(*exportText)(const text *, void *)); |
82 | 85 |
static int usefulArg(const char *arg); |
83 | 86 |
static void messageDedup(message *m); |
... | ... |
@@ -2054,7 +2057,8 @@ decode(message *m, const char *in, unsigned char *out, unsigned char (*decoder)( |
2054 | 2054 |
case 4: |
2055 | 2055 |
*out++ = (b1 << 2) | ((b2 >> 4) & 0x3); |
2056 | 2056 |
*out++ = (b2 << 4) | ((b3 >> 2) & 0xF); |
2057 |
- *out++ = (b3 << 6) | (b4 & 0x3F); |
|
2057 |
+ if((nbytes == 4) || b3) |
|
2058 |
+ *out++ = (b3 << 6) | (b4 & 0x3F); |
|
2058 | 2059 |
break; |
2059 | 2060 |
case 2: |
2060 | 2061 |
*out++ = (b1 << 2) | ((b2 >> 4) & 0x3); |