Browse code

bb#2307

aCaB authored on 2010/10/18 20:23:51
Showing 2 changed files
... ...
@@ -1,3 +1,7 @@
1
+Mon Oct 18 13:23:42 CEST 2010 (acab)
2
+------------------------------------
3
+ * libclamav/scanners.c: mark embpes as unreliable (bb#2307)
4
+
1 5
 Mon Oct 18 14:16:11 EEST 2010 (edwin)
2 6
 -------------------------------------
3 7
  * clamconf/clamconf.c, libclamav/others.c: warn about zlib version mismatches (bb #2072)
... ...
@@ -1636,6 +1636,7 @@ static int cli_scanembpe(cli_ctx *ctx, off_t offset)
1636 1636
 	char *buff;
1637 1637
 	char *tmpname;
1638 1638
 	fmap_t *map = *ctx->fmap;
1639
+	unsigned int corrupted_input;
1639 1640
 
1640 1641
     tmpname = cli_gentemp(ctx->engine->tmpdir);
1641 1642
     if(!tmpname)
... ...
@@ -1686,7 +1687,11 @@ static int cli_scanembpe(cli_ctx *ctx, off_t offset)
1686 1686
 
1687 1687
     ctx->recursion++;
1688 1688
     lseek(fd, 0, SEEK_SET);
1689
-    if((ret = cli_magic_scandesc(fd, ctx)) == CL_VIRUS) {
1689
+    corrupted_input = ctx->corrupted_input;
1690
+    ctx->corrupted_input = 1;
1691
+    ret = cli_magic_scandesc(fd, ctx);
1692
+    ctx->corrupted_input = corrupted_input;
1693
+    if(ret == CL_VIRUS) {
1690 1694
 	cli_dbgmsg("cli_scanembpe: Infected with %s\n", *ctx->virname);
1691 1695
 	close(fd);
1692 1696
 	if(!ctx->engine->keeptmp) {