From: Brian Pane Date: Fri, 29 Mar 2002 04:47:10 +0000 (+0000) Subject: Replaced my fix for the is_only_below() bug with Cliff's faster X-Git-Tag: 2.0.34~43 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=54ae6c947e95602108779bc378dd3577ffebd61f;p=thirdparty%2Fapache%2Fhttpd.git Replaced my fix for the is_only_below() bug with Cliff's faster 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 --- diff --git a/modules/filters/mod_include.c b/modules/filters/mod_include.c index 992f3ac61b3..d038ce1613d 100644 --- a/modules/filters/mod_include.c +++ b/modules/filters/mod_include.c @@ -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;