Module Name:src
Committed By: martin
Date: Thu Nov 19 11:25:18 UTC 2020
Modified Files:
src/libexec/httpd [netbsd-9]: bozohttpd.c
Log Message:
Pull up following revision(s) (requested by hannken in ticket #1134):
libexec/httpd/bozohttpd.c: revision 1.124
Bozohttpd clobbers files greater than 4GB on 32bit archs.
Make sure the alignment mask derived from pagesize is an off_t.
To generate a diff of this commit:
cvs rdiff -u -r1.113 -r1.113.2.1 src/libexec/httpd/bozohttpd.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/libexec/httpd/bozohttpd.c
diff -u src/libexec/httpd/bozohttpd.c:1.113 src/libexec/httpd/bozohttpd.c:1.113.2.1
--- src/libexec/httpd/bozohttpd.c:1.113 Thu Feb 28 09:16:42 2019
+++ src/libexec/httpd/bozohttpd.c Thu Nov 19 11:25:18 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: bozohttpd.c,v 1.113 2019/02/28 09:16:42 mrg Exp $ */
+/* $NetBSD: bozohttpd.c,v 1.113.2.1 2020/11/19 11:25:18 martin Exp $ */
/* $eterna: bozohttpd.c,v 1.178 2011/11/18 09:21:15 mrg Exp $ */
@@ -907,7 +907,7 @@ mmap_and_write_part(bozohttpd_t *httpd,
*
* we use the write offset in all writes
*/
- mappedoffset = first_byte_pos & ~(httpd->page_size - 1);
+ mappedoffset = first_byte_pos & ~((off_t)httpd->page_size - 1);
mappedsz = (size_t)
(first_byte_pos - mappedoffset + sz + httpd->page_size - 1) &
~(httpd->page_size - 1);