r2180 - trunk/varnish-cache/lib/libvarnishapi

phk at projects.linpro.no phk at projects.linpro.no
Mon Oct 29 09:24:04 CET 2007


Author: phk
Date: 2007-10-29 09:24:04 +0100 (Mon, 29 Oct 2007)
New Revision: 2180

Modified:
   trunk/varnish-cache/lib/libvarnishapi/shmlog.c
Log:
Mask negative characters to 8 bit before formatting.


Modified: trunk/varnish-cache/lib/libvarnishapi/shmlog.c
===================================================================
--- trunk/varnish-cache/lib/libvarnishapi/shmlog.c	2007-10-29 08:16:22 UTC (rev 2179)
+++ trunk/varnish-cache/lib/libvarnishapi/shmlog.c	2007-10-29 08:24:04 UTC (rev 2180)
@@ -353,7 +353,7 @@
 			if (*ptr >= ' ' && *ptr <= '~')
 				fprintf(fo, "%c", *ptr);
 			else
-				fprintf(fo, "%%%02x", *ptr);
+				fprintf(fo, "%%%02x", (*ptr) & 0xff);
 			ptr++;
 		}
 		fprintf(fo, "\"\n");




More information about the varnish-commit mailing list