summaryrefslogtreecommitdiff
path: root/libexec/httpd
diff options
context:
space:
mode:
authormrg <mrg@NetBSD.org>2018-12-04 00:26:15 +0000
committermrg <mrg@NetBSD.org>2018-12-04 00:26:15 +0000
commit8339bb54cdce2d8a0b189f15dc29b1ddf9413f48 (patch)
tree85fdcd2adac0248077503f70b12da101c903f434 /libexec/httpd
parentb2c77ed8ff3e1ad896dc5b5d5c48d7ffc2d2781e (diff)
avoid sign extension in % handling (and printing 0xFFFFFF before
wanted values.) from Rajeev V. Pillai.
Diffstat (limited to 'libexec/httpd')
-rw-r--r--libexec/httpd/bozohttpd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libexec/httpd/bozohttpd.c b/libexec/httpd/bozohttpd.c
index dd8aef8fdf2..38995efc5d3 100644
--- a/libexec/httpd/bozohttpd.c
+++ b/libexec/httpd/bozohttpd.c
@@ -1,4 +1,4 @@
-/* $NetBSD: bozohttpd.c,v 1.99 2018/11/25 07:37:20 mrg Exp $ */
+/* $NetBSD: bozohttpd.c,v 1.100 2018/12/04 00:26:15 mrg Exp $ */
/* $eterna: bozohttpd.c,v 1.178 2011/11/18 09:21:15 mrg Exp $ */
@@ -1023,7 +1023,7 @@ bozo_escape_rfc3986(bozohttpd_t *httpd, const char *url, int absolute)
case '\r':
case ' ':
encode_it:
- snprintf(d, 4, "%%%02X", *s++);
+ snprintf(d, 4, "%%%02X", (unsigned char)*s++);
d += 3;
len += 3;
break;