[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:13:19 UTC 2010
The following commit has been merged in the debian/unstable branch:
commit 4cf78d9e19a2be00f3dd53db9395fb8de9af52d9
Author: Tomasz Kojm <tkojm at clamav.net>
Date: Tue Dec 29 13:51:26 2009 +0100
sigtool/sigtool.c: handle lsigs created by the bytecode compiler
diff --git a/ChangeLog b/ChangeLog
index 7d1e82f..4542364 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Tue Dec 29 13:50:01 CET 2009 (tk)
+---------------------------------
+ * sigtool/sigtool.c: handle lsigs created by the bytecode compiler
+
Mon Dec 28 23:27:40 CET 2009 (tk)
---------------------------------
* sigtool/sigtool.c: properly handle anchored sigs (bb#1780)
diff --git a/sigtool/sigtool.c b/sigtool/sigtool.c
index a3910a1..12fc9e1 100644
--- a/sigtool/sigtool.c
+++ b/sigtool/sigtool.c
@@ -2022,7 +2022,7 @@ static int decodesig(char *sig, int fd)
{
char *pt;
const char *tokens[68];
- int tokens_count, subsigs, i;
+ int tokens_count, subsigs, i, bc = 0;
if(strchr(sig, ';')) { /* lsig */
tokens_count = cli_strtokenize(sig, ';', 67 + 1, (const char **) tokens);
@@ -2031,6 +2031,8 @@ static int decodesig(char *sig, int fd)
return -1;
}
mprintf("VIRUS NAME: %s\n", tokens[0]);
+ if(strlen(tokens[0]) && strstr(tokens[0], ".{") && tokens[0][strlen(tokens[0]) - 1] == '}')
+ bc = 1;
mprintf("TDB: %s\n", tokens[1]);
mprintf("LOGICAL EXPRESSION: %s\n", tokens[2]);
subsigs = cli_ac_chklsig(tokens[2], tokens[2] + strlen(tokens[2]), NULL, NULL, NULL, 1);
@@ -2043,12 +2045,15 @@ static int decodesig(char *sig, int fd)
mprintf("!decodesig: Too many subsignatures\n");
return -1;
}
- if(subsigs != tokens_count - 3) {
+ if(!bc && subsigs != tokens_count - 3) {
mprintf("!decodesig: The number of subsignatures (==%u) doesn't match the IDs in the logical expression (==%u)\n", tokens_count - 3, subsigs);
return -1;
}
- for(i = 0; i < subsigs; i++) {
- mprintf(" * SUBSIG ID %d\n", i);
+ for(i = 0; i < tokens_count - 3; i++) {
+ if(i >= subsigs)
+ mprintf(" * BYTECODE SUBSIG\n");
+ else
+ mprintf(" * SUBSIG ID %d\n", i);
if((pt = strchr(tokens[3 + i], ':'))) {
*pt++ = 0;
mprintf(" +-> OFFSET: %s\n", tokens[3 + i]);
--
Debian repository for ClamAV
More information about the Pkg-clamav-commits
mailing list