Mailing List Archive

Proposed patch to libclamav/scanners.c

I have been trying to get clamscan working on cygwin and it appears that
on other Windows systems than 2000 tempfile() returns NULL unless there
is \tmp folder on the drive. TMPDIR is set in the environment variables.

To get it working I changed libclamav/scanners.c - the only file where
tmpfile() is used. I put a wrapper cli_safe_tmpfile() that tries
tempfile() and if it fails then it uses cl_gentemp on cygwin, on other
systems it just calls tempfile().

Attached is the patch of the above for your consideration.