fix detection problem with *.ndb OLE2 signatures

git-svn: trunk@1528
remotes/push_mirror/metadata
Tomasz Kojm 20 years ago
parent 102ef20940
commit 81df516305
  1. 6
      clamav-devel/ChangeLog
  2. 7
      clamav-devel/libclamav/matcher-ac.c
  3. 4
      clamav-devel/libclamav/matcher-bm.c

@ -1,3 +1,9 @@
Tue May 10 21:29:45 CEST 2005 (tk)
----------------------------------
* libclamav/matcher-ac.c, libclamav/matcher-bm.c: fix detection problem with
*.ndb OLE2 signatures
(problem reported by Trog)
Tue May 10 04:47:28 CEST 2005 (tk)
----------------------------------
* libclamav/matcher.c: fix signature offset calculation in large files

@ -1,10 +1,10 @@
/*
* C implementation of the Aho-Corasick pattern matching algorithm. It's based
* on ScannerDaemon's Java version by Kurt Huwig and
* on the ScannerDaemon's version (coded in Java) by Kurt Huwig and
* http://www-sr.informatik.uni-tuebingen.de/~buehler/AC/AC.html
* Thanks to Kurt Huwig for pointing me to this page.
*
* Copyright (C) 2002 - 2004 Tomasz Kojm <tkojm@clamav.net>
* Copyright (C) 2002 - 2005 Tomasz Kojm <tkojm@clamav.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -295,7 +295,8 @@ int cli_ac_scanbuff(const char *buffer, unsigned int length, const char **virnam
t = type;
else
t = ftype;
if(fd == -1 || !cli_validatesig(pt->target, t, pt->offset, offset + position, fd, pt->virname)) {
if((fd == -1 && !t) || !cli_validatesig(pt->target, t, pt->offset, offset + position, fd, pt->virname)) {
pt = pt->next;
continue;
}

@ -1,5 +1,5 @@
/*
* Copyright (C) 2004 Tomasz Kojm <tkojm@clamav.net>
* Copyright (C) 2004 - 2005 Tomasz Kojm <tkojm@clamav.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -180,7 +180,7 @@ int cli_bm_scanbuff(const char *buffer, unsigned int length, const char **virnam
if(p->target || p->offset) {
off = offset + i - BM_MIN_LENGTH + BM_BLOCK_SIZE;
if(fd == -1 || !cli_validatesig(p->target, ftype, p->offset, off, fd, p->virname)) {
if((fd == -1 && !ftype) || !cli_validatesig(p->target, ftype, p->offset, off, fd, p->virname)) {
p = p->next;
continue;
}

Loading…
Cancel
Save