From b204e6b61a10794d664427a3c1dd5f012ebbbe65 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Tue, 27 Oct 2009 09:29:01 +0100 Subject: [PATCH] httpd_indexcgi: fix off-by-one error Signed-off-by: Denys Vlasenko --- networking/httpd_indexcgi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/networking/httpd_indexcgi.c b/networking/httpd_indexcgi.c index 2605ad1bc..6663a22ad 100644 --- a/networking/httpd_indexcgi.c +++ b/networking/httpd_indexcgi.c @@ -149,7 +149,7 @@ static void fmt_url(/*char *dst,*/ const char *name) guarantee(3); *dst = c; if ((c - '0') > 9 /* not a digit */ - && ((c|0x20) - 'a') > 26 /* not A-Z or a-z */ + && ((c|0x20) - 'a') > ('z' - 'a') /* not A-Z or a-z */ && !strchr("._-+@", c) ) { *dst++ = '%'; -- 2.25.1