summaryrefslogtreecommitdiffstats
path: root/usr.sbin/httpd
diff options
context:
space:
mode:
authorbluhm <bluhm@openbsd.org>2018-05-23 19:11:48 +0000
committerbluhm <bluhm@openbsd.org>2018-05-23 19:11:48 +0000
commitfbb03ccd385bd80df87db45ecb2fc268100ebf15 (patch)
tree017847ab662d80046d2d27b57ef3b3f519ed5952 /usr.sbin/httpd
parentForgot to revert another "port 80" (diff)
downloadwireguard-openbsd-fbb03ccd385bd80df87db45ecb2fc268100ebf15.tar.xz
wireguard-openbsd-fbb03ccd385bd80df87db45ecb2fc268100ebf15.zip
Set the port.op value when parsing the httpd.conf port value.
Otherwise the default port for http or https may used depending on uninitialized memory. Fixes regress on i386. OK reyk@
Diffstat (limited to 'usr.sbin/httpd')
-rw-r--r--usr.sbin/httpd/parse.y4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/httpd/parse.y b/usr.sbin/httpd/parse.y
index e794441a3bb..2cdfab5dda9 100644
--- a/usr.sbin/httpd/parse.y
+++ b/usr.sbin/httpd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.98 2018/05/19 13:56:56 jsing Exp $ */
+/* $OpenBSD: parse.y,v 1.99 2018/05/23 19:11:48 bluhm Exp $ */
/*
* Copyright (c) 2007 - 2015 Reyk Floeter <reyk@openbsd.org>
@@ -1123,6 +1123,7 @@ port : PORT NUMBER {
YYERROR;
}
$$.val[0] = htons($2);
+ $$.op = 1;
}
| PORT STRING {
int val;
@@ -1135,6 +1136,7 @@ port : PORT NUMBER {
free($2);
$$.val[0] = val;
+ $$.op = 1;
}
;