Commit 90391b29 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Mask negative characters to 8 bit before formatting.


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@2180 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 5d8edbab
...@@ -353,7 +353,7 @@ VSL_H_Print(void *priv, enum shmlogtag tag, unsigned fd, unsigned len, unsigned ...@@ -353,7 +353,7 @@ VSL_H_Print(void *priv, enum shmlogtag tag, unsigned fd, unsigned len, unsigned
if (*ptr >= ' ' && *ptr <= '~') if (*ptr >= ' ' && *ptr <= '~')
fprintf(fo, "%c", *ptr); fprintf(fo, "%c", *ptr);
else else
fprintf(fo, "%%%02x", *ptr); fprintf(fo, "%%%02x", (*ptr) & 0xff);
ptr++; ptr++;
} }
fprintf(fo, "\"\n"); fprintf(fo, "\"\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment