libclamav/matcher-bm.c: fix offset check (bb#2032)

0.96
Tomasz Kojm 15 years ago
parent 6ed8f1f846
commit a205da7fd7
  1. 4
      ChangeLog
  2. 2
      libclamav/matcher-bm.c

@ -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.

@ -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++;

Loading…
Cancel
Save