diff --git a/ChangeLog b/ChangeLog index fbe8d5e0c..d0dec4ce8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Tue May 18 23:35:43 CEST 2010 (tk) +---------------------------------- + * libclamav/matcher-bm.c: fix offset check (bb#2032) + Tue May 18 20:20:15 EEST 2010 (edwin) ------------------------------------- * libclamav/fmap.c: fix bug introduced in clamav-0.96-51-g3e3b587. diff --git a/libclamav/matcher-bm.c b/libclamav/matcher-bm.c index a4ae60adb..3dd7714f8 100644 --- a/libclamav/matcher-bm.c +++ b/libclamav/matcher-bm.c @@ -271,6 +271,8 @@ int cli_bm_scanbuff(const unsigned char *buffer, uint32_t length, const char **v if(offdata) { if(!offdata->cnt) return CL_CLEAN; + if(offdata->pos == offdata->cnt) + offdata->pos--; for(; offdata->pos && offdata->offtab[offdata->pos] > offset; offdata->pos--); if(offdata->offtab[offdata->pos] < offset) offdata->pos++;