From 79bd8e5fc997aa21ec5bd0cce82c5eae685cae9c Mon Sep 17 00:00:00 2001 From: Ben Laurie Date: Sat, 3 Jan 2004 17:29:57 +0000 Subject: [PATCH] Make handling of 0 back compatible. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102162 13f79535-47bb-0310-9956-ffa450edef68 --- server/gen_test_char.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server/gen_test_char.c b/server/gen_test_char.c index cfd10040ca..d34db3beaf 100644 --- a/server/gen_test_char.c +++ b/server/gen_test_char.c @@ -115,11 +115,11 @@ int main(int argc, char *argv[]) * * Rem please keep in-sync with apr's list in win32/filesys.c */ - if (strchr("&;`'\"|*?~<>^()[]{}$\\\n\r%", c)) { + if (c && strchr("&;`'\"|*?~<>^()[]{}$\\\n\r%", c)) { flags |= T_ESCAPE_SHELL_CMD; } #else - if (strchr("&;`'\"|*?~<>^()[]{}$\\\n", c)) { + if (c && strchr("&;`'\"|*?~<>^()[]{}$\\\n", c)) { flags |= T_ESCAPE_SHELL_CMD; } #endif @@ -133,7 +133,7 @@ int main(int argc, char *argv[]) } /* these are the "tspecials" from RFC2068 */ - if (apr_iscntrl(c) || strchr(" \t()<>@,;:\\/[]?={}", c)) { + if (c && (apr_iscntrl(c) || strchr(" \t()<>@,;:\\/[]?={}", c))) { flags |= T_HTTP_TOKEN_STOP; } @@ -142,7 +142,7 @@ int main(int argc, char *argv[]) * backslashes (because we use backslash for escaping) * and 8-bit chars with the high bit set */ - if (!apr_isprint(c) || c == '"' || c == '\\' || apr_iscntrl(c)) { + if (c && (!apr_isprint(c) || c == '"' || c == '\\' || apr_iscntrl(c))) { flags |= T_ESCAPE_LOGITEM; } -- 2.50.1