From: phk Date: Sun, 20 Aug 2006 15:11:34 +0000 (+0000) Subject: Assert that the cli status is valid X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8a213e5bc3302c7e933726700bd3f2f62e3c86d0;p=varnish Assert that the cli status is valid git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@850 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/lib/libvarnish/cli_common.c b/varnish-cache/lib/libvarnish/cli_common.c index 9f19cbde..9902c6e3 100644 --- a/varnish-cache/lib/libvarnish/cli_common.c +++ b/varnish-cache/lib/libvarnish/cli_common.c @@ -58,6 +58,8 @@ cli_writeres(int fd, struct cli *cli) * any misformats by snprintf */ + assert(cli->result >= 100); + assert(cli->result <= 999); i = snprintf(res, sizeof res, "%-3d %-8d\n", cli->result, vsb_len(cli->sb)); assert(i == CLI_LINE0_LEN);