Skip to content

Commit

Permalink
Stop incorrectly reporting overflow on zeroed ws.
Browse files Browse the repository at this point in the history
Ref: #2008
  • Loading branch information
Lasse Karstensen committed Jul 7, 2016
1 parent 71eebc9 commit 11692e7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion bin/varnishd/cache/cache_panic.c
Expand Up @@ -157,7 +157,7 @@ pan_ws(struct vsb *vsb, const struct ws *ws)
return;
VSB_indent(vsb, 2);
PAN_CheckMagic(vsb, ws, WS_MAGIC);
if (!(ws->id[0] & 0x20))
if (ws->id[0] != '\0' && (!(ws->id[0] & 0x20)))
VSB_printf(vsb, "OVERFLOWED ");
VSB_printf(vsb, "id = \"%s\",\n", ws->id);
VSB_printf(vsb, "{s, f, r, e} = {%p", ws->s);
Expand Down
1 change: 1 addition & 0 deletions bin/varnishd/cache/cache_ws.c
Expand Up @@ -257,6 +257,7 @@ int
WS_Overflowed(const struct ws *ws)
{
CHECK_OBJ_NOTNULL(ws, WS_MAGIC);
AN(ws->id[0]);

if (ws->id[0] & 0x20)
return (0);
Expand Down

0 comments on commit 11692e7

Please sign in to comment.