On 04/08/2010 08:04 PM, Royce Williams wrote:
> First time poster, in a bind.  We're running ClamAV 0.95.3 on FreeBSD
> 7.3.

Does this still occur with 0.96?

>  We're getting this error in our sendmail logs:
> 
> /var/spool/MIMEDefang/mdefang-o38GNjZv088151/Work/msg-81178-1234.pdf:
> Can't map file into memory ERROR

That error is probably coming from here (in pdf.c):
        p = buf = mmap(NULL, size, PROT_READ, MAP_PRIVATE, desc, offset);
        if(buf == MAP_FAILED) {
                cli_errmsg("cli_pdf: mmap() failed\n");
                return CL_EMAP;
        }

Please change that code to be:
        p = buf = mmap(NULL, size, PROT_READ, MAP_PRIVATE, desc, offset);
        if(buf == MAP_FAILED) {
                perror("mmap failed");
                cli_errmsg("cli_pdf: mmap() failed\n");
                return CL_EMAP;
        }

So that we see the actual error.

Does this occur every time you scan that file?
If so, please open a bugreport, and attach the log from this command:
$ strace clamscan
/var/spool/MIMEDefang/mdefang-o38GNjZv088151/Work/msg-81178-1234.pdf 2>log

Assuming you run a FreeBSD that supports strace, if not use ktrace
instead of strace, and attach the output from kdump.

Best regards,
--Edwin
_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://www.clamav.net/support/ml

Reply via email to