syslog with mmap failures. Noticed by and ok henning@, "looks right"
deraadt@
-/* $OpenBSD: ftpd.c,v 1.198 2013/08/22 04:43:40 guenther Exp $ */
+/* $OpenBSD: ftpd.c,v 1.199 2014/01/08 17:31:36 jca Exp $ */
/* $NetBSD: ftpd.c,v 1.15 1995/06/03 22:46:47 mycroft Exp $ */
/*
if (isreg && filesize < (off_t)16 * 1024 * 1024) {
size_t fsize = (size_t)filesize;
+ if (fsize == 0) {
+ transflag = 0;
+ reply(226, "Transfer complete.");
+ return(0);
+ }
+
buf = mmap(0, fsize, PROT_READ, MAP_SHARED, filefd,
(off_t)0);
if (buf == MAP_FAILED) {