git-svn: trunk@1984
Nigel Horne authored on 2006/05/18 20:31:57... | ... |
@@ -16,7 +16,7 @@ |
16 | 16 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
17 | 17 |
* MA 02110-1301, USA. |
18 | 18 |
*/ |
19 |
-static char const rcsid[] = "$Id: message.c,v 1.168 2006/05/12 17:12:46 nigelhorne Exp $"; |
|
19 |
+static char const rcsid[] = "$Id: message.c,v 1.169 2006/05/18 11:31:57 njh Exp $"; |
|
20 | 20 |
|
21 | 21 |
#if HAVE_CONFIG_H |
22 | 22 |
#include "clamav-config.h" |
... | ... |
@@ -955,6 +955,11 @@ messageIsEncoding(message *m) |
955 | 955 |
static const char binhex[] = "(This file must be converted with BinHex 4.0)"; |
956 | 956 |
const char *line = lineGetData(m->body_last->t_line); |
957 | 957 |
|
958 |
+ /* not enough matches to warrant this test */ |
|
959 |
+ /*if(lineGetRefCount(m->body_last->t_line) > 1) { |
|
960 |
+ return; |
|
961 |
+ }*/ |
|
962 |
+ |
|
958 | 963 |
if((m->encoding == NULL) && |
959 | 964 |
(strncasecmp(line, encoding, sizeof(encoding) - 1) == 0) && |
960 | 965 |
(strstr(line, "7bit") == NULL)) |
... | ... |
@@ -1029,9 +1034,6 @@ messageExport(message *m, const char *dir, void *(*create)(void), void (*destroy |
1029 | 1029 |
|
1030 | 1030 |
cli_dbgmsg("messageExport: numberOfEncTypes == %d\n", m->numberOfEncTypes); |
1031 | 1031 |
|
1032 |
- if(setCTX && m->ctx) |
|
1033 |
- (*setCTX)(ret, m->ctx); |
|
1034 |
- |
|
1035 | 1032 |
if((t_line = binhexBegin(m)) != NULL) { |
1036 | 1033 |
unsigned char byte; |
1037 | 1034 |
unsigned long newlen = 0L, len, l; |
... | ... |
@@ -1287,6 +1289,9 @@ messageExport(message *m, const char *dir, void *(*create)(void), void (*destroy |
1287 | 1287 |
len, l); |
1288 | 1288 |
len = l; |
1289 | 1289 |
} |
1290 |
+ if(setCTX && m->ctx) |
|
1291 |
+ (*setCTX)(ret, m->ctx); |
|
1292 |
+ |
|
1290 | 1293 |
(*addData)(ret, &data[byte], len); |
1291 | 1294 |
|
1292 | 1295 |
blobDestroy(tmp); |
... | ... |
@@ -1327,6 +1332,9 @@ messageExport(message *m, const char *dir, void *(*create)(void), void (*destroy |
1327 | 1327 |
return exportText(messageGetBody(m), ret); |
1328 | 1328 |
} |
1329 | 1329 |
|
1330 |
+ if(setCTX && m->ctx) |
|
1331 |
+ (*setCTX)(ret, m->ctx); |
|
1332 |
+ |
|
1330 | 1333 |
for(i = 0; i < m->numberOfEncTypes; i++) { |
1331 | 1334 |
encoding_type enctype = m->encodingTypes[i]; |
1332 | 1335 |
size_t size; |