From ffe6231f35d8ed1bf69f125faeb0cd1cbc8c5e97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?T=C3=B6r=C3=B6k=20Edvin?= Date: Sat, 11 Oct 2008 10:27:20 +0000 Subject: [PATCH] scan javascript with type 7 (and implicitly with type 0) too git-svn: trunk@4246 --- ChangeLog | 5 +++++ libclamav/scanners.c | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index 446f622a0..1b269cea3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sat Oct 11 13:01:36 EEST 2008 (edwin) +------------------------------------- + * libclamav/scanners.c: scan javascript with type 7 (and implicitly + with type 0) too + Sat Oct 11 12:20:10 CEST 2008 (acab) * freshclama/manager.c: bump _XOPEN_SOURCE diff --git a/libclamav/scanners.c b/libclamav/scanners.c index 4b62aae6a..f55c36687 100644 --- a/libclamav/scanners.c +++ b/libclamav/scanners.c @@ -986,6 +986,10 @@ static int cli_scanhtml(int desc, cli_ctx *ctx) fd = open(fullname, O_RDONLY|O_BINARY); if(fd >= 0) { ret = cli_scandesc(fd, ctx, CL_TYPE_HTML, 0, NULL, AC_SCAN_VIR); + if (ret == CL_CLEAN) { + lseek(fd, 0, SEEK_SET); + ret = cli_scandesc(fd, ctx, CL_TYPE_TEXT_ASCII, 0, NULL, AC_SCAN_VIR); + } close(fd); } }