On Wed, 1 Sep 2004, Tomasz Kojm wrote:
; On Tue, 31 Aug 2004 21:03:22 +0000 (GMT)
; Andy Fiddaman <[EMAIL PROTECTED]> wrote:
;
; >
; > Since the latest daily update, ClamAV has been crashing here with
; > every email it scans, has anyone else seen this ?
; > It appears to be related to the new .hdb file containing an EICAR
; > signature.
; >
; > ClamAV version devel-20040819
; >
; > Initial backtrace is (more details when I've investigated a bit more):
; >
; > Program received signal SIGSEGV, Segmentation fault.
; > __md5_process_block (buffer=0x1006cfc3a, len=64,
; > ctx=0xffffffff7fffea10)
; > at md5.c:338
;
; Fixed in CVS.
Drat, beat me to it ;)
although I can't see the change in the copy I just checked out.
The fix that worked here is below, I'll wait to see the official fix.
Thanks,
Andy
diff -u -r clamav-devel.orig/libclamav/matcher.c
clamav-devel/libclamav/matcher.
c
--- clamav-devel.orig/libclamav/matcher.c 2004-09-01
15:37:12.763859000 +0
000
+++ clamav-devel/libclamav/matcher.c 2004-09-01 15:39:49.797060000
+0000
@@ -91,7 +91,7 @@
}
/* prepare the buffer */
- buffsize = root->maxpatlen + SCANBUFF;
+ buffsize = root->maxpatlen + SCANBUFF + sizeof(md5_uint32);
if(!(buffer = (char *) cli_calloc(buffsize, sizeof(char)))) {
cli_dbgmsg("cli_scandesc(): unable to cli_malloc(%d)\n",
buffsize);
return CL_EMEM;
@@ -110,14 +110,22 @@
return CL_EMEM;
}
- if(root->md5_hlist)
- md5_init_ctx (&ctx);
buff = buffer;
buff += root->maxpatlen; /* pointer to read data block */
endbl = buff + SCANBUFF - root->maxpatlen; /* pointer to the last
block
* length of
root->maxpatlen
*/
+ if(root->md5_hlist)
+ {
+ int align;
+
+ md5_init_ctx (&ctx);
+
+ align = (unsigned long)buff % __alignof__(md5_uint32);
+ buff += align;
+ endbl += align;
+ }
pt= buff;
length = SCANBUFF;
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
Clamav-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/clamav-users