httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cove...@apache.org
Subject svn commit: r1796350 - /httpd/httpd/trunk/server/util.c
Date Fri, 26 May 2017 21:40:11 GMT
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) {



Mime
View raw message