[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:26:55 UTC 2010
The following commit has been merged in the debian/unstable branch:
commit d11cced29113455f4b5f9e9bd32e45c340cc1b71
Author: Török Edvin <edwin at clamav.net>
Date: Sun Mar 28 20:15:48 2010 +0300
Fix some possible uninitialized value uses.
diff --git a/libclamav/bytecode.c b/libclamav/bytecode.c
index a8af137..0a77e41 100644
--- a/libclamav/bytecode.c
+++ b/libclamav/bytecode.c
@@ -553,7 +553,7 @@ static void parseType(struct cli_bc *bc, struct cli_bc_type *ty,
unsigned j;
ty->numElements = readNumber(buffer, off, len, ok);
- if (!ok) {
+ if (!*ok) {
cli_errmsg("Error parsing type\n");
*ok = 0;
return;
diff --git a/libclamav/bytecode_api.c b/libclamav/bytecode_api.c
index 3f1a0b2..4cb6fae 100644
--- a/libclamav/bytecode_api.c
+++ b/libclamav/bytecode_api.c
@@ -89,6 +89,9 @@ int32_t cli_bcapi_seek(struct cli_bc_ctx* ctx, int32_t pos, uint32_t whence)
case 2:
off = ctx->file_size + pos;
break;
+ default:
+ cli_dbgmsg("bcapi_seek: invalid whence value\n");
+ return -1;
}
if (off < 0 || off > ctx->file_size) {
cli_dbgmsg("bcapi_seek: out of file: %ld (max %d)\n",
diff --git a/libclamav/filtering.c b/libclamav/filtering.c
index 7da03bb..9300172 100644
--- a/libclamav/filtering.c
+++ b/libclamav/filtering.c
@@ -183,7 +183,7 @@ static inline void filter_set_end(struct filter *m, unsigned pos, uint16_t a)
* add('abc'); add('bcd'); will match [ab][bc][cd] */
int filter_add_static(struct filter *m, const unsigned char *pattern, unsigned long len, const char *name)
{
- uint16_t q;
+ uint16_t q = 0;
uint8_t j, maxlen;
uint32_t best = 0xffffffff;
uint8_t best_pos = 0;
--
Debian repository for ClamAV
More information about the Pkg-clamav-commits
mailing list