]> granicus.if.org Git - apache/commitdiff
Be more explicit about NUL in case iscntrl is inconsistent
authorWilliam A. Rowe Jr <wrowe@apache.org>
Fri, 29 Jul 2016 15:40:15 +0000 (15:40 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Fri, 29 Jul 2016 15:40:15 +0000 (15:40 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1754539 13f79535-47bb-0310-9956-ffa450edef68

server/gen_test_char.c

index c0d0903d6958526c9836098d6cf262bd085a72c0..cf7b0f83b60aa7d37cf22ae7294e62ab8723dd3c 100644 (file)
@@ -120,8 +120,8 @@ int main(int argc, char *argv[])
          * XXX: With luck, isascii behaves sensibly on EBCDIC platforms
          *      and insists on chars that correspond to ASCII equivilants
          */
-        if (apr_iscntrl(c) || strchr(" \t()<>@,;:\\\"/[]?={}", c))
-                           || !apr_isascii(c)) {
+        if (!c || apr_iscntrl(c) || strchr(" \t()<>@,;:\\\"/[]?={}", c))
+                                 || !apr_isascii(c)) {
             flags |= T_HTTP_TOKEN_STOP;
         }