fix incorrect calculation of maxshift in some cases (bb#390)

git-svn: trunk@2921
remotes/push_mirror/metadata
Tomasz Kojm 18 years ago
parent 3c882206b1
commit 95b0d95e8c
  1. 5
      ChangeLog
  2. 5
      libclamav/matcher-ac.c

@ -1,3 +1,8 @@
Thu Mar 8 22:45:39 CET 2007 (tk)
---------------------------------
* libclamav/matcher-ac.c: fix incorrect calculation of maxshift in some cases
(bb#390)
Thu Mar 8 20:34:36 EET 2007 (edwin)
---------------------------------
* contrib/entitynorm/: fix entity list generator to support more entities,

@ -480,7 +480,10 @@ int cli_ac_scanbuff(const unsigned char *buffer, unsigned int length, const char
}
if(found) {
mdata->maxshift[pt->sigid - 1] = mdata->partoff[pt->sigid - 1][j] + pt->maxdist - curroff;
if(pt->maxdist)
mdata->maxshift[pt->sigid - 1] = mdata->partoff[pt->sigid - 1][j] + pt->maxdist - curroff;
else
mdata->maxshift[pt->sigid - 1] = -1;
mdata->partoff[pt->sigid - 1][0] = curroff + pt->length;
mdata->offcnt[pt->sigid - 1] = 1;

Loading…
Cancel
Save