You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by co...@apache.org on 2017/05/26 21:40:11 UTC

svn commit: r1796350 - /httpd/httpd/trunk/server/util.c

Author: covener
Date: Fri May 26 21:40:11 2017
New Revision: 1796350

URL: http://svn.apache.org/viewvc?rev=1796350&view=rev
Log:
short-circuit on NULL

Submitted By: jchampion


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

Modified: httpd/httpd/trunk/server/util.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/util.c?rev=1796350&r1=1796349&r2=1796350&view=diff
==============================================================================
--- httpd/httpd/trunk/server/util.c (original)
+++ httpd/httpd/trunk/server/util.c Fri May 26 21:40:11 2017
@@ -1680,10 +1680,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) {