[Pkg-clamav-commits] [SCM] Debian repository for ClamAV branch, debian/unstable, updated. debian/0.95+dfsg-1-6156-g094ec9b
Tomasz Kojm
tkojm at clamav.net
Sun Apr 4 01:08:31 UTC 2010
The following commit has been merged in the debian/unstable branch:
commit 799a761fe6fe22860497422cfe2e07879b29bb76
Author: Tomasz Kojm <tkojm at clamav.net>
Date: Tue Oct 27 21:05:13 2009 +0100
another error path leak
diff --git a/sigtool/vba.c b/sigtool/vba.c
index 5527e9c..06cff44 100644
--- a/sigtool/vba.c
+++ b/sigtool/vba.c
@@ -993,15 +993,23 @@ static int sigtool_scandir (const char *dirname, int hex_output)
/* generate the temporary directory */
dir = cli_gentemp (tmpdir);
+ if(!dir) {
+ printf("cli_gentemp() failed\n");
+ closedir (dd);
+ return -1;
+ }
+
if (mkdir (dir, 0700)) {
printf ("Can't create temporary directory %s\n", dir);
closedir (dd);
+ free(dir);
return CL_ETMPDIR;
}
if ((desc = open (fname, O_RDONLY|O_BINARY)) == -1) {
printf ("Can't open file %s\n", fname);
closedir (dd);
+ free(dir);
return 1;
}
@@ -1010,6 +1018,7 @@ static int sigtool_scandir (const char *dirname, int hex_output)
printf("malloc failed\n");
closedir (dd);
close(desc);
+ free(dir);
return 1;
}
*ctx.fmap = fmap(desc, 0, 0);
@@ -1017,6 +1026,7 @@ static int sigtool_scandir (const char *dirname, int hex_output)
printf("fmap failed\n");
closedir (dd);
close(desc);
+ free(dir);
return 1;
}
if ((ret = cli_ole2_extract (dir, &ctx, &vba))) {
--
Debian repository for ClamAV
More information about the Pkg-clamav-commits
mailing list