On Wed, 12 Nov 2003 23:32:44 -0500 (EST)
Igor Brezac <[EMAIL PROTECTED]> wrote:

> 
> Hello,
> 
> I get the following error when ScanMail is enabled and ScanArchive is
> disabled.
> 
> /var/src/clamav-0.65/test/test1: Recursion limit exceeded. ERROR
> 
> Here is a possible fix:
> 
> --- scanners.c.orig     Wed Nov 12 23:20:27 2003
> +++ scanners.c  Wed Nov 12 23:18:45 2003
> @@ -640,7 +640,7 @@
>      if(SCAN_ARCHIVE || SCAN_MAIL) {
>          /* Need to examine file type */
> 
> -       if(limits && limits->maxreclevel)
> +       if(SCAN_ARCHIVE && limits && limits->maxreclevel)
>             if(*reclev > limits->maxreclevel)
>                 return CL_EMAXREC;


Oh, this is a bug in clamd and not in libclamav - clamd doesn't
initialize the limits when ScanArchive is disabled. But I think it's
also a good idea to apply your patch to protect against similar bugs in
the future. Fixed in CVS. Thanks.

Best regards,
Tomasz Kojm
-- 
      oo    .....       [EMAIL PROTECTED]         www.ClamAV.net
     (\/)\.........     http://www.clamav.net/gpg/tkojm.gpg
        \..........._   0DCA5A08407D5288279DB43454822DC8985A444B
          //\   /\      Sun Nov 16 01:29:50 CET 2003

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to