CVSROOT: /cvs
Module name: ports
Changes by: [email protected] 2016/01/11 10:53:05
Modified files:
www/squidclamav: Makefile
Added files:
www/squidclamav/patches: patch-src_squidclamav_c
Log message:
Fix what looks like a typo (BUFSIZ/LBUFSIZ) in squidclamav with safebrowsing
checks enabled. Triggers the "backwards memcpy" checks but it's really an
overrun.
Found with this, it's not perfect but useful nonetheless.
#include <syslog.h>
#define memcpy(dst0, src0, length0) do { \
char *dst = (char *)dst0; \
const char *src = (char *)src0; \
size_t length = (size_t) length0; \
\
if ((dst < src && dst + length > src) || \
(src < dst && src + length > dst)) \
syslog(LOG_CRIT, "backwards memcpy %s:%u len=%llu", \
__FILE__, __LINE__, (uint64_t) length); \
memmove (dst, src, length); } while (0)