[master] 1daa9be Error checking for vsb allocation failure in VRT_synth_page() / VCL synthetic()
Nils Goroll
nils.goroll at uplex.de
Thu Sep 21 15:16:08 UTC 2017
commit 1daa9be95e283e9e73376c45ae7cf28c67cfb054
Author: Nils Goroll <nils.goroll at uplex.de>
Date: Thu Sep 21 17:05:45 2017 +0200
Error checking for vsb allocation failure in VRT_synth_page() / VCL synthetic()
diff --git a/bin/varnishd/cache/cache_vrt.c b/bin/varnishd/cache/cache_vrt.c
index ecd2374..cf57413 100644
--- a/bin/varnishd/cache/cache_vrt.c
+++ b/bin/varnishd/cache/cache_vrt.c
@@ -438,7 +438,11 @@ VRT_synth_page(VRT_CTX, const char *str, ...)
while (p != vrt_magic_string_end) {
if (p == NULL)
p = "(null)";
- VSB_cat(vsb, p);
+ if (VSB_cat(vsb, p)) {
+ VRT_fail(ctx, "synthetic(): %s",
+ strerror(VSB_error(vsb)));
+ break;
+ }
p = va_arg(ap, const char *);
}
va_end(ap);
More information about the varnish-commit
mailing list