diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-12-16 20:05:31 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-12-16 20:05:31 +0000 |
commit | 8b66b26e198f21b9cea1d08ab3091f732148b3fb (patch) | |
tree | 6ac316133a27b967f13f26542ba802c72746448b | |
parent | f53809cf1939d9868f2a2bb6e009872c0c9b9511 (diff) | |
download | mandoc-8b66b26e198f21b9cea1d08ab3091f732148b3fb.tar.gz |
Fix assertion found when plugging legacy man.cgi query string into my
man.cgi.
-rw-r--r-- | cgi.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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) { /* |