summaryrefslogtreecommitdiffstats
path: root/cgi.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-07-25 19:37:34 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-07-25 19:37:34 +0000
commit41d963282eebdbc3224f4cacea8af0675fe603d9 (patch)
tree3fd7414257387588d6b6dfcb7dbc3d3c3773d539 /cgi.c
parent14507509c84c8e127a65e94522ce74cffda72306 (diff)
downloadmandoc-41d963282eebdbc3224f4cacea8af0675fe603d9.tar.gz
oops, we must not try to validate a manpath we don't have;
fixing an oversight introduced in rev. 1.77
Diffstat (limited to 'cgi.c')
-rw-r--r--cgi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/cgi.c b/cgi.c
index 5060638f..f3f25204 100644
--- a/cgi.c
+++ b/cgi.c
@@ -1086,7 +1086,8 @@ main(void)
if (NULL != (querystring = getenv("QUERY_STRING")))
http_parse(&req, querystring);
- if ( ! validate_manpath(&req, req.q.manpath)) {
+ if ( ! (NULL == req.q.manpath ||
+ validate_manpath(&req, req.q.manpath))) {
pg_error_badrequest(
"You specified an invalid manpath.");
return(EXIT_FAILURE);