summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-12-16 20:05:31 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-12-16 20:05:31 +0000
commit8b66b26e198f21b9cea1d08ab3091f732148b3fb (patch)
tree6ac316133a27b967f13f26542ba802c72746448b
parentf53809cf1939d9868f2a2bb6e009872c0c9b9511 (diff)
downloadmandoc-8b66b26e198f21b9cea1d08ab3091f732148b3fb.tar.gz
Fix assertion found when plugging legacy man.cgi query string into my
man.cgi.
-rw-r--r--cgi.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/cgi.c b/cgi.c
index b8e009a4..6d25fbfe 100644
--- a/cgi.c
+++ b/cgi.c
@@ -510,7 +510,9 @@ resp_search(struct res *r, size_t sz, void *arg)
const struct req *req;
req = (const struct req *)arg;
- assert(req->q.manroot >= 0);
+
+ if (sz > 0)
+ assert(req->q.manroot >= 0);
if (1 == sz) {
/*