Browse code

libclamav/special.c: fix possible false positive MS04-028 for files with corrupted headers (bb#1422)

git-svn: trunk@4971

Tomasz Kojm authored on 2009/03/23 01:20:32
Showing 2 changed files
... ...
@@ -1,3 +1,8 @@
1
+Sun Mar 22 17:19:10 CET 2009 (tk)
2
+---------------------------------
3
+ * libclamav/special.c: fix possible false positive MS04-028 for files with
4
+			corrupted headers (bb#1422)
5
+
1 6
 Sun Mar 22 15:15:22 CET 2009 (tk)
2 7
 ---------------------------------
3 8
  * libclamav/readdb.c: return error instead of crashing when cl_load() gets
... ...
@@ -224,7 +224,7 @@ int cli_check_jpeg_exploit(int fd, cli_ctx *ctx)
224 224
 
225 225
 		offset = ((unsigned int) buffer[2] << 8) + buffer[3];
226 226
 		if (offset < 2) {
227
-			return 1;
227
+			return -1;
228 228
 		}
229 229
 		offset -= 2;
230 230
 		offset += lseek(fd, 0, SEEK_CUR);