Browse code

fix some debug messages

git-svn: trunk@2749

Tomasz Kojm authored on 2007/02/14 06:35:27
Showing 6 changed files
... ...
@@ -1,3 +1,7 @@
1
+Tue Feb 13 22:34:40 CET 2007 (tk)
2
+---------------------------------
3
+  * libclamav: fix some debug messages
4
+
1 5
 Tue Feb 13 19:48:22 GMT 2007 (njh)
2 6
 ----------------------------------
3 7
   * libclamav/mbox.c:	Fix BeOS link error
... ...
@@ -824,7 +824,7 @@ static int chm_decompress_stream(int fd, const char *dirname, itsf_header_t *its
824 824
 	snprintf(filename, 1024, "%s/clamav-unchm.bin", dirname);
825 825
 	tmpfd = open(filename, O_WRONLY|O_CREAT|O_TRUNC|O_BINARY, S_IRWXU);
826 826
 	if (!tmpfd) {
827
-		cli_dbgmsg("open failed\n", filename);
827
+		cli_dbgmsg("open failed for %s\n", filename);
828 828
 		return FALSE;
829 829
 	}
830 830
 
... ...
@@ -110,7 +110,7 @@ int unfsg_133(char *source, char *dest, int ssize, int dsize, struct cli_exe_sec
110 110
     else 
111 111
       sections[i].vsz = lastsz;
112 112
 
113
-    cli_dbgmsg("FSG: .SECT%d RVA:%x VSize:%x ROffset: %x, RSize:% x\n", i, sections[i].rva, sections[i].vsz, sections[i].raw, sections[i].rsz);
113
+    cli_dbgmsg("FSG: .SECT%d RVA:%x VSize:%x ROffset: %x, RSize:%x\n", i, sections[i].rva, sections[i].vsz, sections[i].raw, sections[i].rsz);
114 114
   }
115 115
 
116 116
   if (!cli_rebuildpe(dest, sections, sectcount+1, base, ep, 0, 0, file)) {
... ...
@@ -222,7 +222,7 @@ int petite_inflate2x_1to9(char *buf, uint32_t minrva, uint32_t bufsz, struct pe_
222 222
       /* Showtime!!! */
223 223
       cli_dbgmsg("Petite: Sections dump:\n");
224 224
       for (t = 0; t < j ; t++)
225
-	cli_dbgmsg("Petite: .SECT%d RVA:%x VSize:%x ROffset: %x, RSize:% x\n", t, usects[t].rva, usects[t].vsz, usects[t].raw, usects[t].rsz);
225
+	cli_dbgmsg("Petite: .SECT%d RVA:%x VSize:%x ROffset: %x, RSize:%x\n", t, usects[t].rva, usects[t].vsz, usects[t].raw, usects[t].rsz);
226 226
       if (! cli_rebuildpe(buf, usects, j, Imagebase, enc_ep, ResRva, ResSize, desc)) {
227 227
 	cli_dbgmsg("Petite: Rebuilding failed\n");
228 228
 	free(usects);
... ...
@@ -329,7 +329,7 @@ static int sis_extract_simple(int fd, char *mfile, uint32_t length, uint32_t off
329 329
 	}
330 330
 
331 331
 	if(close(desc) == -1) {
332
-	    cli_errmsg("SIS: sis_extract_simple: Can't close descriptor %d\n", filelen, fname);
332
+	    cli_errmsg("SIS: sis_extract_simple: Can't close descriptor %d\n", desc);
333 333
 	    free(subdir);
334 334
 	    free(fname);
335 335
 	    if(compressed)
... ...
@@ -139,7 +139,7 @@ static int jpeg_check_photoshop_8bim(int fd)
139 139
 
140 140
 	retval = cli_check_jpeg_exploit(fd);
141 141
 	if (retval == 1) {
142
-		cli_dbgmsg("Exploit found in thumbnail\n", retval);
142
+		cli_dbgmsg("Exploit found in thumbnail\n");
143 143
 	}
144 144
 	lseek(fd, offset+size, SEEK_SET);
145 145