Browse code

swf: log message down-leveling

David Raynor authored on 2013/12/25 01:50:25
Showing 1 changed files
... ...
@@ -59,7 +59,7 @@
59 59
 	bitbuf = (unsigned int) get_c;						\
60 60
 	offset += sizeof(get_c);						\
61 61
     } else {									\
62
-	cli_errmsg("cli_scanswf: INITBITS: Can't read file\n");			\
62
+	cli_warnmsg("cli_scanswf: INITBITS: Can't read file or file truncated\n");	\
63 63
 	return CL_EFORMAT;							\
64 64
     }										\
65 65
 }
... ...
@@ -76,7 +76,7 @@
76 76
 	    bitpos = 8;								\
77 77
 	    offset += sizeof(get_c);						\
78 78
 	} else {								\
79
-	    cli_errmsg("cli_scanswf: GETBITS: Can't read file\n");		\
79
+	    cli_warnmsg("cli_scanswf: GETBITS: Can't read file or file truncated\n");	\
80 80
 	    return CL_EFORMAT;							\
81 81
 	}									\
82 82
     }										\
... ...
@@ -92,14 +92,14 @@
92 92
 	getword_1 = (unsigned int) get_c;					\
93 93
 	offset += sizeof(get_c);						\
94 94
     } else {									\
95
-	cli_errmsg("cli_scanswf: GETWORD: Can't read file\n");			\
95
+	cli_warnmsg("cli_scanswf: GETWORD: Can't read file or file truncated\n");	\
96 96
 	return CL_EFORMAT;							\
97 97
     }										\
98 98
     if(fmap_readn(map, &get_c, offset, sizeof(get_c)) == sizeof(get_c)) {	\
99 99
 	getword_2 = (unsigned int) get_c;					\
100 100
 	offset += sizeof(get_c);						\
101 101
     } else {									\
102
-	cli_errmsg("cli_scanswf: GETWORD: Can't read file\n");			\
102
+	cli_warnmsg("cli_scanswf: GETWORD: Can't read file or file truncated\n");	\
103 103
 	return CL_EFORMAT;							\
104 104
     }										\
105 105
     v = (uint16_t)(getword_1 & 0xff) | ((getword_2 & 0xff) << 8);		\
... ...
@@ -296,7 +296,7 @@ int cli_scanswf(cli_ctx *ctx)
296 296
 	cli_dbgmsg("SWF: %s\n", pt ? pt : "UNKNOWN TAG");
297 297
 	cli_dbgmsg("SWF: Tag length: %u\n", tag_len);
298 298
 	if (tag_len > map->len) {
299
-	    cli_warnmsg("SWF: Invalid tag length.\n");
299
+	    cli_dbgmsg("SWF: Invalid tag length.\n");
300 300
 	    return CL_EFORMAT;
301 301
 	}
302 302
 	if ((offset + tag_len) < offset) {