From 8a213e5bc3302c7e933726700bd3f2f62e3c86d0 Mon Sep 17 00:00:00 2001 From: phk Date: Sun, 20 Aug 2006 15:11:34 +0000 Subject: [PATCH] Assert that the cli status is valid git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@850 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/lib/libvarnish/cli_common.c | 2 ++ 1 file changed, 2 insertions(+) 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); -- 2.39.5