From: Ben Laurie Date: Sat, 3 Jan 2004 17:30:15 +0000 (+0000) Subject: Make handling of 0 back compatible. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f503908ccea3315c31daa55e6f2fc87896deea64;p=thirdparty%2Fapache%2Fhttpd.git Make handling of 0 back compatible. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@102163 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/main/gen_test_char.c b/src/main/gen_test_char.c index 589ce8ef73a..ebe30660bfc 100644 --- a/src/main/gen_test_char.c +++ b/src/main/gen_test_char.c @@ -49,11 +49,11 @@ int main(int argc, char *argv[]) * specific as well, to assure that cross-compiled unix * applications behave similiarly when invoked on win32/os2. */ - 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 @@ -67,7 +67,7 @@ int main(int argc, char *argv[]) } /* these are the "tspecials" from RFC2068 */ - if (ap_iscntrl(c) || strchr(" \t()<>@,;:\\/[]?={}", c)) { + if (c && (ap_iscntrl(c) || strchr(" \t()<>@,;:\\/[]?={}", c))) { flags |= T_HTTP_TOKEN_STOP; } @@ -76,7 +76,7 @@ int main(int argc, char *argv[]) * backslashes (because we use backslash for escaping) * and 8-bit chars with the high bit set */ - if (!ap_isprint(c) || c == '"' || c == '\\' || ap_iscntrl(c)) { + if (c && (!ap_isprint(c) || c == '"' || c == '\\' || ap_iscntrl(c))) { flags |= T_ESCAPE_LOGITEM; }