[master] cdf9a180d VMOD blob encoder: don't forget the terminating null byte
Geoff Simmons
geoff at uplex.de
Wed Jul 18 14:35:07 UTC 2018
commit cdf9a180d4acb2dd577d12781a120076100af025
Author: Geoff Simmons <geoff at uplex.de>
Date: Wed Jul 18 16:33:39 2018 +0200
VMOD blob encoder: don't forget the terminating null byte
diff --git a/lib/libvmod_blob/vmod_blob.c b/lib/libvmod_blob/vmod_blob.c
index 87591fb52..632580e91 100644
--- a/lib/libvmod_blob/vmod_blob.c
+++ b/lib/libvmod_blob/vmod_blob.c
@@ -431,6 +431,7 @@ encode(VRT_CTX, enum encoding enc, enum case_e kase, VCL_BLOB b)
WS_Reset(ctx->ws, snap);
return "";
}
+ buf[len] = '\0';
WS_Release(ctx->ws, len + 1);
return buf;
}
More information about the varnish-commit
mailing list