]> err.no Git - varnish/commitdiff
Mask negative characters to 8 bit before formatting.
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 29 Oct 2007 08:24:04 +0000 (08:24 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 29 Oct 2007 08:24:04 +0000 (08:24 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2180 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/lib/libvarnishapi/shmlog.c

index 2bc9afe05f285b5fd81cf99332ba6331485d1287..9958534a6a7db923bf7aca54bf45bf2682a91572 100644 (file)
@@ -353,7 +353,7 @@ VSL_H_Print(void *priv, enum shmlogtag tag, unsigned fd, unsigned len, unsigned
                        if (*ptr >= ' ' && *ptr <= '~')
                                fprintf(fo, "%c", *ptr);
                        else
-                               fprintf(fo, "%%%02x", *ptr);
+                               fprintf(fo, "%%%02x", (*ptr) & 0xff);
                        ptr++;
                }
                fprintf(fo, "\"\n");