]> err.no Git - varnish/commitdiff
Assert that the cli status is valid
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sun, 20 Aug 2006 15:11:34 +0000 (15:11 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sun, 20 Aug 2006 15:11:34 +0000 (15:11 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@850 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/lib/libvarnish/cli_common.c

index 9f19cbde7a1fd9e653c8e187b2372322bc046a31..9902c6e3f896cdecde9af2cdd8bb9731588ca68c 100644 (file)
@@ -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);