]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Replaced my fix for the is_only_below() bug with Cliff's faster
authorBrian Pane <brianp@apache.org>
Fri, 29 Mar 2002 04:47:10 +0000 (04:47 +0000)
committerBrian Pane <brianp@apache.org>
Fri, 29 Mar 2002 04:47:10 +0000 (04:47 +0000)
and simpler version.
Submitted by: Cliff Woolley

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94291 13f79535-47bb-0310-9956-ffa450edef68

modules/filters/mod_include.c

index 992f3ac61b31f44b6ff071f401dc4372c1d7313a..d038ce1613dd9b364798275bbd4da9ffdb3473a8 100644 (file)
@@ -1182,11 +1182,12 @@ static int is_only_below(const char *path)
             return 0;
 #endif
         path += dots;
-        while (*path && (*path != '/')) {
-            ++path;
-        }
-        if (*path == '/') {
-            ++path;
+        /* Advance to either the null byte at the end of the
+         * string or the character right after the next slash,
+         * whichever comes first
+         */
+        while (*path && (*path++ != '/')) {
+            continue;
         }
     }
     return 1;