]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
* Avoid an overflow on large inputs
authorRuediger Pluem <rpluem@apache.org>
Wed, 27 Apr 2022 06:35:02 +0000 (06:35 +0000)
committerRuediger Pluem <rpluem@apache.org>
Wed, 27 Apr 2022 06:35:02 +0000 (06:35 +0000)
PR: 66033

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

changes-entries/pr66033.txt [new file with mode: 0644]
server/util.c

diff --git a/changes-entries/pr66033.txt b/changes-entries/pr66033.txt
new file mode 100644 (file)
index 0000000..caa98d1
--- /dev/null
@@ -0,0 +1,2 @@
+  *) core: Avoid an overflow on large inputs in ap_is_matchexp.  PR 66033
+     [Ruediger Pluem]
index c49274d6560d6aa1f23b6e82bcdb2fad828c5b30..c57258aeb39e5d246254bdb61bcf006c78f974df 100644 (file)
@@ -251,10 +251,8 @@ AP_DECLARE(int) ap_os_is_path_absolute(apr_pool_t *p, const char *dir)
 
 AP_DECLARE(int) ap_is_matchexp(const char *str)
 {
-    int x;
-
-    for (x = 0; str[x]; x++)
-        if ((str[x] == '*') || (str[x] == '?'))
+    for (; *str; str++)
+        if ((*str == '*') || (*str == '?'))
             return 1;
     return 0;
 }