Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/libexec/httpd PR bin/52194: bozohttpd fails to exec scripts ...



details:   https://anonhg.NetBSD.org/src/rev/7afcf5a4d9e6
branches:  trunk
changeset: 828100:7afcf5a4d9e6
user:      martin <martin%NetBSD.org@localhost>
date:      Tue Nov 28 10:33:51 2017 +0000

description:
PR bin/52194: bozohttpd fails to exec scripts via the -C mechanism
sometimes with EFAULT due to not NULL terminated environment.

diffstat:

 libexec/httpd/cgi-bozo.c |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diffs (18 lines):

diff -r 61de019a2eed -r 7afcf5a4d9e6 libexec/httpd/cgi-bozo.c
--- a/libexec/httpd/cgi-bozo.c  Tue Nov 28 09:06:25 2017 +0000
+++ b/libexec/httpd/cgi-bozo.c  Tue Nov 28 10:33:51 2017 +0000
@@ -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 @@
                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



Home | Main Index | Thread Index | Old Index