[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:09:31 UTC 2010
The following commit has been merged in the debian/unstable branch:
commit 55d2828386f3bc290fba8fee748794d24f4efdff
Author: Tomasz Kojm <tkojm at clamav.net>
Date: Mon Nov 23 23:27:14 2009 +0100
fix memleaks
diff --git a/sigtool/sigtool.c b/sigtool/sigtool.c
index 0b3f030..4fea8dd 100644
--- a/sigtool/sigtool.c
+++ b/sigtool/sigtool.c
@@ -1678,7 +1678,7 @@ static char *decodehexstr(const char *hex)
static int decodehex(const char *hexsig)
{
- char *pt, *hexcpy, *start, *n;
+ char *pt, *hexcpy, *start, *n, *decoded;
int asterisk = 0;
unsigned int i, j, hexlen, parts = 0;
int mindist = 0, maxdist = 0, error = 0;
@@ -1724,7 +1724,13 @@ static int decodehex(const char *hexsig)
else if(maxdist)
mprintf("{WILDCARD_ANY_STRING(LENGTH<=%u)}", maxdist);
- mprintf("%s", decodehexstr(start));
+ if(!(decoded = decodehexstr(start))) {
+ mprintf("!Decoding failed\n");
+ free(hexcpy);
+ return -1;
+ }
+ mprintf("%s", decoded);
+ free(decoded);
if(i == parts)
break;
@@ -1799,14 +1805,24 @@ static int decodehex(const char *hexsig)
mprintf("!Can't extract part %u of partial signature\n", i);
return -1;
}
- mprintf("%s", decodehexstr(pt));
+ if(!(decoded = decodehexstr(pt))) {
+ mprintf("!Decoding failed\n");
+ return -1;
+ }
+ mprintf("%s", decoded);
+ free(decoded);
if(i < parts)
mprintf("{WILDCARD_ANY_STRING}");
free(pt);
}
} else {
- mprintf("%s", decodehexstr(hexsig));
+ if(!(decoded = decodehexstr(hexsig))) {
+ mprintf("!Decoding failed\n");
+ return -1;
+ }
+ mprintf("%s", decoded);
+ free(decoded);
}
mprintf("\n");
--
Debian repository for ClamAV
More information about the Pkg-clamav-commits
mailing list