libclamav: matcher-bm: fix node sorting

git-svn: trunk@730
remotes/push_mirror/metadata
Tomasz Kojm 21 years ago
parent b475d5eaec
commit 5afda27296
  1. 11
      clamav-devel/ChangeLog
  2. 6
      clamav-devel/libclamav/matcher-bm.c

@ -1,10 +1,15 @@
Sat Aug 7 01:33:14 CEST 2004 (tk)
----------------------------------
* libclamav: matcher-bm: fix node sorting (false negative example provided
by René Bellora <rbellora*tecnoaccion.com.ar>)
Fri Aug 6 11:09:22 BST 2004 (njh)
----------------------------------
* clamav-milter: Quarantined file's names now contain the name of the
virus
Handle crash when --bounce is set, and MAIL FROM isn't
sent in an e-mail containing a virus.
Fix by "Denis Ustimenko" <den@uzsci.net>
Fix by "Denis Ustimenko" <den*uzsci.net>
Thu Aug 5 19:53:40 CEST 2004 (tk)
----------------------------------
@ -26,8 +31,8 @@ Thu Aug 5 08:44:51 BST 2004 (njh)
sendmail variables are now delimeted by
dollars, e.g. ${j}$
Better local IP table by Damian Menscher
<menscher@uiuc.edu> and Andy Fiddaman
<clam@fiddaman.net>
<menscher*uiuc.edu> and Andy Fiddaman
<clam*fiddaman.net>
Thu Aug 5 03:10:32 CEST 2004 (tk)
----------------------------------

@ -52,7 +52,7 @@ int cli_bm_addpatt(struct cl_node *root, struct cli_bm_patt *pattern)
prev = next = root->bm_suffix[idx];
while(next) {
if(next->pattern[0] >= pt[0])
if(pt[0] > next->pattern[0])
break;
prev = next;
next = next->next;
@ -118,7 +118,7 @@ void cli_bm_free(struct cl_node *root)
int cli_bm_scanbuff(const char *buffer, unsigned int length, const char **virname, const struct cl_node *root)
{
int i, j, shift, off, found;
int i, j, shift, off, found = 0;
uint16_t idx;
struct cli_bm_patt *p;
const char *bp;
@ -151,12 +151,14 @@ int cli_bm_scanbuff(const char *buffer, unsigned int length, const char **virnam
break;
}
}
if(found && p->length == j) {
if(virname)
*virname = p->virname;
return CL_VIRUS;
}
p = p->next;
}

Loading…
Cancel
Save