[Mimedefang] Not an ARRAY reference error
Paul Murphy
pmurphy at ionixpharma.com
Mon Aug 23 09:27:58 EDT 2004
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
_______________________________________________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: zipcheck.pl
Type: application/octet-stream
Size: 5421 bytes
Desc: zipcheck.pl
URL: <https://lists.mimedefang.org/pipermail/mimedefang_lists.mimedefang.org/attachments/20040823/78ed34a4/attachment-0003.obj>
More information about the MIMEDefang
mailing list