]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Make handling of 0 back compatible.
authorBen Laurie <ben@apache.org>
Sat, 3 Jan 2004 17:30:15 +0000 (17:30 +0000)
committerBen Laurie <ben@apache.org>
Sat, 3 Jan 2004 17:30:15 +0000 (17:30 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@102163 13f79535-47bb-0310-9956-ffa450edef68

src/main/gen_test_char.c

index 589ce8ef73a687aa507b3b4b02493cc1fb8a3359..ebe30660bfc6a302015a9b13d7b994503384f613 100644 (file)
@@ -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;
        }