From 9511215d215cb11a30fd4c57c4a7cf7e84294527 Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Fri, 16 Dec 2011 20:05:31 +0000 Subject: Fix assertion found when plugging legacy man.cgi query string into my man.cgi. --- cgi.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cgi.c b/cgi.c index 4f3d530b..0eb7d059 100644 --- a/cgi.c +++ b/cgi.c @@ -1,4 +1,4 @@ -/* $Id: cgi.c,v 1.36 2011/12/16 18:37:12 kristaps Exp $ */ +/* $Id: cgi.c,v 1.37 2011/12/16 20:05:31 kristaps Exp $ */ /* * Copyright (c) 2011 Kristaps Dzonsons * @@ -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) { /* -- cgit v1.2.3-56-ge451