Marco,

I believe it's failing because you are calling file-based code on a directory
entry in the Zip file.

Instead, I use code which skips directory entries:

        if ($zip->read($path) == AZ_OK) # file is OK and can be read     
          {
          md_syslog('debug', "Scanning zip file, Path=$path");
          my $tfname = Archive::Zip::tempFileName('.');
          my @members = $zip->members();
          foreach my $member (@members)
            {
            if (! $member->isDirectory()) # no sense worrying about folders
              {
              my $file = $member->fileName();
              $size = $member->uncompressedSize();  # check for DoS content
              md_syslog('debug', "scanning ZIP member $file, size=$size");
              if ($size > 50e6) # approx 50Mb
                {
                md_graphdefang_log('Archive member too big', $file, $RelayAddr);
                action_discard();
                return;
                }
...

The full version of this code is attached.

Best Wishes,

Paul.
__________________________________________________
Paul Murphy
Head of Informatics
Ionix Pharmaceuticals Ltd
418 Science Park, Cambridge, CB4 0PA

Tel. 01223 433741
Fax. 01223 433788


_______________________________________________________________________
DISCLAIMER:
This email and any files transmitted with it are confidential and 
intended solely for the use of the individual or entity to which they
are addressed.  If you have received this email in error please contact
the sender or the Ionix IT Helpdesk on +44 (0) 1223 433741
_______________________________________________________________________ 

Attachment: zipcheck.pl
Description: zipcheck.pl

_______________________________________________
Visit http://www.mimedefang.org and http://www.canit.ca
MIMEDefang mailing list
[EMAIL PROTECTED]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang

Reply via email to