I don't think it is likely that they would, but some users are running
out of memory, so make it deterministic when it happens.
Noticed by Coverity Scan (CID: 4-6)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2370
d4fa192b-c00b-0410-8231-
f00ffab90ce4
vsb_clear(cli->sb);
cli_dispatch(cli, CLI_cmds, buf);
vsb_finish(cli->sb);
+ AZ(vsb_overflowed(cli->sb));
i = cli_writeres(heritage.fds[1], cli);
if (i) {
VSL(SLT_Error, 0, "CLI write failed (errno=%d)", errno);
" </body>\n"
"</html>\n");
vsb_finish(&vsb);
+ AZ(vsb_overflowed(&vsb));
w->acct.hdrbytes = WRK_Write(w, vsb_data(&vsb), vsb_len(&vsb));
(void)WRK_Flush(w);
vsb_delete(&vsb);
vsb_clear(sbh);
vsb_printf(sbh, "%c%.*s:%c", 1 + (q - p), q - p, p, 0);
vsb_finish(sbh);
+ AZ(vsb_overflowed(sbh));
/* Append to vary matching string */
vsb_bcat(sb, vsb_data(sbh), vsb_len(sbh));
vsb_printf(sb, "%c", 0);
vsb_finish(sb);
+ AZ(vsb_overflowed(sb));
l = vsb_len(sb);
sp->obj->vary = malloc(l);
AN(sp->obj->vary);
vsb_putc(sb, '\n');
xxxassert(!vsb_overflowed(sb));
vsb_finish(sb);
+ AZ(vsb_overflowed(sb));
i = write(cli_o, vsb_data(sb), vsb_len(sb));
xxxassert(i == vsb_len(sb));
vsb_delete(sb);
vsb_clear(cp->cli->sb);
cli_dispatch(cp->cli, cli_proto, p);
vsb_finish(cp->cli->sb);
+ AZ(vsb_overflowed(cp->cli->sb));
/* send the result back */
if (cli_writeres(cp->fdo, cp->cli))
vsb_new(&cmdsb, cmdline, sizeof cmdline, 0);
mgt_make_cc_cmd(&cmdsb, sf, of);
vsb_finish(&cmdsb);
+ AZ(vsb_overflowed(&cmdsb));
/* XXX check vsb state */
if (pipe(p) < 0) {
vf = mgt_VccCompileFile(sb, f_arg, C_flag, f_fd);
}
vsb_finish(sb);
+ AZ(vsb_overflowed(sb));
if (vsb_len(sb) > 0)
fprintf(stderr, "%s", vsb_data(sb));
vsb_delete(sb);
XXXAN(sb);
vf = mgt_VccCompile(sb, av[3], NULL, 0);
vsb_finish(sb);
+ AZ(vsb_overflowed(sb));
if (vsb_len(sb) > 0)
cli_out(cli, "%s", vsb_data(sb));
vsb_delete(sb);
XXXAN(sb);
vf = mgt_VccCompileFile(sb, av[3], 0, -1);
vsb_finish(sb);
+ AZ(vsb_overflowed(sb));
if (vsb_len(sb) > 0)
cli_out(cli, "%s", vsb_data(sb));
vsb_delete(sb);
return;
}
vsb_finish(cli->sb);
+ AZ(vsb_overflowed(cli->sb));
fprintf(stderr, "Error:\n%s\n", vsb_data(cli->sb));
exit (2);
}
if (cli[0].result != CLIS_OK) {
fprintf(stderr, "Parameter errors:\n");
vsb_finish(cli[0].sb);
+ AZ(vsb_overflowed(cli[0].sb));
fprintf(stderr, "%s\n", vsb_data(cli[0].sb));
exit(1);
}