Browse code

scan javascript with type 7 (and implicitly with type 0) too

git-svn: trunk@4246

Török Edvin authored on 2008/10/11 19:27:20
Showing 2 changed files
... ...
@@ -1,3 +1,8 @@
1
+Sat Oct 11 13:01:36 EEST 2008 (edwin)
2
+-------------------------------------
3
+ * libclamav/scanners.c: scan javascript with type 7 (and implicitly
4
+ with type 0) too
5
+
1 6
 Sat Oct 11 12:20:10 CEST 2008 (acab)
2 7
   * freshclama/manager.c: bump _XOPEN_SOURCE
3 8
 
... ...
@@ -986,6 +986,10 @@ static int cli_scanhtml(int desc, cli_ctx *ctx)
986 986
 	    fd = open(fullname, O_RDONLY|O_BINARY);
987 987
 	    if(fd >= 0) {
988 988
 		    ret = cli_scandesc(fd, ctx, CL_TYPE_HTML, 0, NULL, AC_SCAN_VIR);
989
+		    if (ret == CL_CLEAN) {
990
+			    lseek(fd, 0, SEEK_SET);
991
+			    ret = cli_scandesc(fd, ctx, CL_TYPE_TEXT_ASCII, 0, NULL, AC_SCAN_VIR);
992
+		    }
989 993
 		    close(fd);
990 994
 	    }
991 995
     }