[Pkg-clamav-commits] [SCM] Debian repository for ClamAV branch, debian/unstable, updated. debian/0.95+dfsg-1-6156-g094ec9b
Török Edvin
edwin at clamav.net
Sun Apr 4 01:18:28 UTC 2010
The following commit has been merged in the debian/unstable branch:
commit c1aff5ec763f724937c88c7129bf494b1b673db4
Author: Török Edvin <edwin at clamav.net>
Date: Tue Feb 2 13:46:37 2010 +0200
fix loading from .cvd.
Chomp first line too, and look for \0 instead of \n.
diff --git a/libclamav/bytecode.c b/libclamav/bytecode.c
index d6fcb3b..6fe7720 100644
--- a/libclamav/bytecode.c
+++ b/libclamav/bytecode.c
@@ -470,7 +470,7 @@ static int parseHeader(struct cli_bc *bc, unsigned char *buffer, unsigned *linel
}
offset++;
*linelength = strtol(buffer+offset, &pos, 10);
- if (*pos != '\n') {
+ if (*pos != '\0') {
cli_errmsg("Invalid number: %s\n", buffer+offset);
return CL_EMALFDB;
}
@@ -1241,6 +1241,7 @@ int cli_bytecode_load(struct cli_bc *bc, FILE *f, struct cli_dbio *dbio, int tru
cli_errmsg("Unable to load bytecode (empty file)\n");
return CL_EMALFDB;
}
+ cli_chomp(firstbuf);
rc = parseHeader(bc, (unsigned char*)firstbuf, &linelength);
if (rc == CL_BREAK) {
bc->state = bc_skip;
--
Debian repository for ClamAV
More information about the Pkg-clamav-commits
mailing list