[master] 1c4d04f68 Dont pass empty strings to VSB_quote()
Poul-Henning Kamp
phk at FreeBSD.org
Mon Mar 1 13:36:08 UTC 2021
commit 1c4d04f68c7d5fe817ff327a8ffefcf7a60e3a02
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Mon Mar 1 09:15:06 2021 +0000
Dont pass empty strings to VSB_quote()
diff --git a/bin/varnishstat/varnishstat_help_gen.c b/bin/varnishstat/varnishstat_help_gen.c
index 1412ea992..bef1ebb6e 100644
--- a/bin/varnishstat/varnishstat_help_gen.c
+++ b/bin/varnishstat/varnishstat_help_gen.c
@@ -69,7 +69,7 @@ main(void)
do {
p = n + 1;
n = strchr(p, '\n');
- if (n != NULL) {
+ if (n != NULL && n > p) {
VSB_putc(vsb, '\t');
VSB_quote(vsb, p, (int)(n - p), VSB_QUOTE_CSTR);
VSB_cat(vsb, ",\n");
More information about the varnish-commit
mailing list