From: phk Date: Thu, 24 Jul 2008 20:16:04 +0000 (+0000) Subject: Properly truncate bytes before hexdumping. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6236699f32fa407bbf5e18013898d38eca5001c9;p=varnish Properly truncate bytes before hexdumping. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3015 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishd/cache_vrt_esi.c b/varnish-cache/bin/varnishd/cache_vrt_esi.c index ab14deff..315bd394 100644 --- a/varnish-cache/bin/varnishd/cache_vrt_esi.c +++ b/varnish-cache/bin/varnishd/cache_vrt_esi.c @@ -117,7 +117,7 @@ esi_error(const struct esi_work *ew, const char *p, int i, const char *err) *q++ = 't'; } else { /* XXX: use %%%02x instead ? */ - q += sprintf(q, "\\x%02x", *p); + q += sprintf(q, "\\x%02x", *p & 0xff); } p++; i--;