[master] d23dfe3 Only ... hexdumps if they are longer than 8 digits

Poul-Henning Kamp phk at FreeBSD.org
Wed May 11 19:38:06 CEST 2016


commit d23dfe3f5733cad84538c93bc21df585d773ca2b
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Wed May 11 17:37:01 2016 +0000

    Only ... hexdumps if they are longer than 8 digits

diff --git a/lib/libvarnish/vsb.c b/lib/libvarnish/vsb.c
index e9e6fc9..7a15f56 100644
--- a/lib/libvarnish/vsb.c
+++ b/lib/libvarnish/vsb.c
@@ -517,7 +517,7 @@ VSB_quote(struct vsb *s, const void *v, int len, int how)
 			if (*w != 0x00)
 				break;
 		VSB_printf(s, "0x");
-		if (w == u + len) {
+		if (w == u + len && len > 4) {
 			VSB_printf(s, "0...0");
 		} else {
 			for (w = u; w < u + len; w++)



More information about the varnish-commit mailing list