Module Name: src Committed By: martin Date: Tue Nov 28 10:33:51 UTC 2017
Modified Files: src/libexec/httpd: cgi-bozo.c Log Message: PR bin/52194: bozohttpd fails to exec scripts via the -C mechanism sometimes with EFAULT due to not NULL terminated environment. To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/libexec/httpd/cgi-bozo.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/cgi-bozo.c diff -u src/libexec/httpd/cgi-bozo.c:1.38 src/libexec/httpd/cgi-bozo.c:1.39 --- src/libexec/httpd/cgi-bozo.c:1.38 Thu Oct 5 04:22:41 2017 +++ src/libexec/httpd/cgi-bozo.c Tue Nov 28 10:33:51 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: cgi-bozo.c,v 1.38 2017/10/05 04:22:41 mrg Exp $ */ +/* $NetBSD: cgi-bozo.c,v 1.39 2017/11/28 10:33:51 martin Exp $ */ /* $eterna: cgi-bozo.c,v 1.40 2011/11/18 09:21:15 mrg Exp $ */ @@ -587,6 +587,8 @@ bozo_process_cgi(bozo_httpreq_t *request bozoerr(httpd, 1, "child socketpair failed: %s", strerror(errno)); + *curenvp = 0; + /* * We create 2 procs: one to become the CGI, one read from * the CGI and output to the network, and this parent will