You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by wr...@apache.org on 2016/07/29 15:40:15 UTC

svn commit: r1754539 - /httpd/httpd/trunk/server/gen_test_char.c

Author: wrowe
Date: Fri Jul 29 15:40:15 2016
New Revision: 1754539

URL: http://svn.apache.org/viewvc?rev=1754539&view=rev
Log:
Be more explicit about NUL in case iscntrl is inconsistent

Modified:
    httpd/httpd/trunk/server/gen_test_char.c

Modified: httpd/httpd/trunk/server/gen_test_char.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/gen_test_char.c?rev=1754539&r1=1754538&r2=1754539&view=diff
==============================================================================
--- httpd/httpd/trunk/server/gen_test_char.c (original)
+++ httpd/httpd/trunk/server/gen_test_char.c Fri Jul 29 15:40:15 2016
@@ -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;
         }