]> err.no Git - varnish/commitdiff
Properly truncate bytes before hexdumping.
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Thu, 24 Jul 2008 20:16:04 +0000 (20:16 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Thu, 24 Jul 2008 20:16:04 +0000 (20:16 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3015 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/cache_vrt_esi.c

index ab14deffbb41f79882ad94be2c982fc521d90d61..315bd3946ae7f266dab7c1cb2dee8600c0bc13df 100644 (file)
@@ -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--;