Sophie

Sophie

distrib > Mageia > 5 > i586 > by-pkgid > 5e86dca416a69633a04e0770c0feb09f > files > 6

apache-2.4.10-16.7.mga5.src.rpm

#commit a585e36e06a53170be6d2d462ceb5b30b8382988
#Author: Jim Jagielski <jim@apache.org>
#Date:   Tue May 30 12:28:20 2017 +0000
#
#    Merge r1796350 from trunk:
#    
#    short-circuit on NULL
#    
#    Submitted By: jchampion
#    
#    
#    Submitted by: covener
#    Reviewed by: covener, ylavic, jim
#    
#    
#    git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1796856 13f79535-47bb-0310-9956-ffa450edef68
#
--- apache2.orig/server/util.c
+++ apache2/server/util.c
@@ -1506,10 +1506,8 @@ AP_DECLARE(int) ap_find_token(apr_pool_t
 
     s = (const unsigned char *)line;
     for (;;) {
-        /* find start of token, skip all stop characters, note NUL
-         * isn't a token stop, so we don't need to test for it
-         */
-        while (TEST_CHAR(*s, T_HTTP_TOKEN_STOP)) {
+        /* find start of token, skip all stop characters */
+        while (*s && TEST_CHAR(*s, T_HTTP_TOKEN_STOP)) {
             ++s;
         }
         if (!*s) {