Commit 6382a1e6 authored by Martin Blix Grydeland's avatar Martin Blix Grydeland

Bail out on workspace exhaustion in VRT_IP_string

Fixes: #1592
parent 2d303b07
......@@ -307,6 +307,10 @@ VRT_IP_string(const struct vrt_ctx *ctx, VCL_IP ip)
if (ip == NULL)
return (NULL);
len = WS_Reserve(ctx->ws, 0);
if (len == 0) {
WS_Release(ctx->ws, 0);
return (NULL);
}
p = ctx->ws->f;
VTCP_name(ip, p, len, NULL, 0);
WS_Release(ctx->ws, strlen(p) + 1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment