Skip to content

Commit

Permalink
fix lost workspace overflow markers
Browse files Browse the repository at this point in the history
As WS_Reset() clears the overflow marker, the correct order for
resetting and marking an overflow is WS_Reset(); WS_MarkOverflow();

Fixes the last seemingly obscure bit of varnishcache#2645
  • Loading branch information
nigoroll authored and dridi committed Jun 20, 2018
1 parent 622df9f commit e54ea1b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bin/varnishd/cache/cache_vrt_var.c
Original file line number Diff line number Diff line change
Expand Up @@ -411,8 +411,8 @@ VRT_l_beresp_storage_hint(VRT_CTX, const char *str, ...)

if (p == NULL) {
VSLb(ctx->vsl, SLT_LostHeader, "storage_hint");
WS_MarkOverflow(ctx->ws);
WS_Reset(ctx->ws, sn);
WS_MarkOverflow(ctx->ws);
return;
}

Expand Down
2 changes: 1 addition & 1 deletion lib/libvmod_std/vmod_std.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ vmod_log(VRT_CTX, const char *fmt, ...)
va_end(ap);

if (p == NULL) {
WS_MarkOverflow(ctx->ws);
WS_Reset(ctx->ws, sn);
WS_MarkOverflow(ctx->ws);
return;
}

Expand Down

0 comments on commit e54ea1b

Please sign in to comment.