git-svn: trunk@2035
Nigel Horne authored on 2006/06/21 04:38:19... | ... |
@@ -1,3 +1,7 @@ |
1 |
+Tue Jun 20 20:37:21 BST 2006 (njh) |
|
2 |
+---------------------------------- |
|
3 |
+ * libclamv/tnef.c: Better indication of where an error was trapped |
|
4 |
+ |
|
1 | 5 |
Tue Jun 20 18:49:10 CEST 2006 (tk) |
2 | 6 |
---------------------------------- |
3 | 7 |
* libclamav/strrcpy.[ch]: remove files; move strrcpy() into str.c |
... | ... |
@@ -25,7 +25,7 @@ |
25 | 25 |
#include "clamav-config.h" |
26 | 26 |
#endif |
27 | 27 |
|
28 |
-static char const rcsid[] = "$Id: tnef.c,v 1.35 2006/05/19 11:02:12 njh Exp $"; |
|
28 |
+static char const rcsid[] = "$Id: tnef.c,v 1.36 2006/06/20 19:36:33 njh Exp $"; |
|
29 | 29 |
|
30 | 30 |
#include <stdio.h> |
31 | 31 |
#include <fcntl.h> |
... | ... |
@@ -148,7 +148,7 @@ cli_tnef(const char *dir, int desc) |
148 | 148 |
case LVL_ATTACHMENT: |
149 | 149 |
cli_dbgmsg("TNEF - found attachment\n"); |
150 | 150 |
if(tnef_attachment(fp, type, tag, length, dir, &fb, fsize) != 0) { |
151 |
- cli_errmsg("Error reading TNEF message\n"); |
|
151 |
+ cli_errmsg("Error reading TNEF attachment\n"); |
|
152 | 152 |
ret = CL_EFORMAT; |
153 | 153 |
alldone = 1; |
154 | 154 |
} |
... | ... |
@@ -270,7 +270,7 @@ tnef_message(FILE *fp, uint16_t type, uint16_t tag, int32_t length, off_t fsize) |
270 | 270 |
/*cli_dbgmsg("%lu %lu\n", (long)(offset + length), ftell(fp));*/ |
271 | 271 |
|
272 | 272 |
if(!CLI_ISCONTAINED2(0, fsize, (off_t)offset, (off_t)length)) { |
273 |
- cli_errmsg("TNEF: Incorrect length field\n"); |
|
273 |
+ cli_errmsg("TNEF: Incorrect length field in tnef_message\n"); |
|
274 | 274 |
return -1; |
275 | 275 |
} |
276 | 276 |
if(fseek(fp, offset + length, SEEK_SET) < 0) |
... | ... |
@@ -350,7 +350,7 @@ tnef_attachment(FILE *fp, uint16_t type, uint16_t tag, int32_t length, const cha |
350 | 350 |
/*cli_dbgmsg("%lu %lu\n", (long)(offset + length), ftell(fp));*/ |
351 | 351 |
|
352 | 352 |
if(!CLI_ISCONTAINED2(0, fsize, (off_t)offset, (off_t)length)) { |
353 |
- cli_errmsg("TNEF: Incorrect length field\n"); |
|
353 |
+ cli_errmsg("TNEF: Incorrect length field in tnef_attachment\n"); |
|
354 | 354 |
return -1; |
355 | 355 |
} |
356 | 356 |
if(fseek(fp, (long)(offset + length), SEEK_SET) < 0) /* shouldn't be needed */ |