diff --git a/clamav-devel/ChangeLog b/clamav-devel/ChangeLog index 86191e77b..1a71173f8 100644 --- a/clamav-devel/ChangeLog +++ b/clamav-devel/ChangeLog @@ -1,3 +1,7 @@ +Tue Aug 3 02:03:17 CEST 2004 (tk) +---------------------------------- + * libclamav: matcher-bm: fix scan boundary + Mon Aug 2 19:03:33 CEST 2004 (tk) ---------------------------------- * libclamav: pe: integrate Petite unpacker from aCaB (not yet activated) diff --git a/clamav-devel/libclamav/matcher-bm.c b/clamav-devel/libclamav/matcher-bm.c index 453ad69d0..ecfc59e7e 100644 --- a/clamav-devel/libclamav/matcher-bm.c +++ b/clamav-devel/libclamav/matcher-bm.c @@ -125,7 +125,7 @@ int cli_bm_scanbuff(const char *buffer, unsigned int length, const char **virnam char prefix; - for(i = BM_MIN_LENGTH - BM_BLOCK_SIZE; i < length; ) { + for(i = BM_MIN_LENGTH - BM_BLOCK_SIZE; i < length - BM_BLOCK_SIZE + 1; ) { idx = 211 * ((unsigned char) buffer[i]) + 37 * ((unsigned char) buffer[i + 1]) + (unsigned char) buffer[i + 2]; shift = root->bm_shift[idx];