Browse code

return 1 for other JPEG exploit variants

git-svn-id: file:///var/lib/svn/clamav-devel/trunk/clamav-devel@1002 77e5149b-7576-45b1-b177-96237e5ba77b

Tomasz Kojm authored on 2004/10/15 09:27:06
Showing 2 changed files
... ...
@@ -1,3 +1,7 @@
1
+Fri Oct 15 02:23:02 CEST 2004 (tk)
2
+----------------------------------
3
+  * libclamav/special.c: return 1 for other JPEG exploit variants
4
+
1 5
 Fri Oct 15 01:53:42 CEST 2004 (tk)
2 6
 ----------------------------------
3 7
   * libclamav/scanners.c: do not return CL_EFORMAT to callers
... ...
@@ -67,14 +67,14 @@ int cli_check_jpeg_exploit(int fd)
67 67
 	unsigned char buffer[4];
68 68
 	off_t offset;
69 69
 	int retval;
70
-	
70
+
71 71
 
72 72
 	cli_dbgmsg("in cli_check_jpeg_exploit()\n");
73 73
 
74 74
 	if (cli_readn(fd, buffer, 2) != 2) {
75 75
 		return 0;
76 76
 	}
77
-	
77
+
78 78
 	if ((buffer[0] != 0xff) || (buffer[1] != 0xd8)) {
79 79
 		return 0;
80 80
 	}
... ...
@@ -104,7 +104,7 @@ int cli_check_jpeg_exploit(int fd)
104 104
 		}
105 105
 		offset = ((unsigned int) buffer[2] << 8) + buffer[3];
106 106
 		if (offset < 2) {
107
-			return 2;
107
+			return 1;
108 108
 		}
109 109
 		offset -= 2;
110 110
 		offset += lseek(fd, 0, SEEK_CUR);