[git commit master] httpd_indexcgi: fix off-by-one error
Denys Vlasenko
vda.linux at googlemail.com
Tue Oct 27 08:29:01 UTC 2009
commit: http://git.busybox.net/busybox/commit/?id=b204e6b61a10794d664427a3c1dd5f012ebbbe65
branch: http://git.busybox.net/busybox/commit/?id=refs/heads/master
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
networking/httpd_indexcgi.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/networking/httpd_indexcgi.c b/networking/httpd_indexcgi.c
index 2605ad1..6663a22 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++ = '%';
--
1.6.3.3
More information about the busybox-cvs
mailing list