fix signature offset calculation in large files

git-svn: trunk@1527
remotes/push_mirror/metadata
Tomasz Kojm 20 years ago
parent bc3259de4d
commit 102ef20940
  1. 5
      clamav-devel/ChangeLog
  2. 12
      clamav-devel/libclamav/matcher.c

@ -1,3 +1,8 @@
Tue May 10 04:47:28 CEST 2005 (tk)
----------------------------------
* libclamav/matcher.c: fix signature offset calculation in large files
(problem reported by Christoph)
Mon May 9 18:06:53 BST 2005 (njh)
----------------------------------
* clamav-milter: Print segfault diagnostic, even if print_trace is

@ -311,11 +311,15 @@ int cli_scandesc(int desc, const char **virname, long int *scanned, const struct
if(bytes == SCANBUFF) {
memmove(buffer, endbl, root->maxpatlen);
offset += bytes - root->maxpatlen;
}
pt = buffer;
length = buffsize;
if(pt == buffer) {
offset += SCANBUFF;
} else {
offset += SCANBUFF - root->maxpatlen;
pt = buffer;
length = buffsize;
}
}
if(root->md5_hlist)
MD5_Update(&ctx, buff, bytes);

Loading…
Cancel
Save