diff options
author | Ruediger Pluem <rpluem@apache.org> | 2022-04-27 06:35:02 +0000 |
---|---|---|
committer | Ruediger Pluem <rpluem@apache.org> | 2022-04-27 06:35:02 +0000 |
commit | e2e1d779179d1c9a053e61fa4a3776a5faf7d653 (patch) | |
tree | a1a14c1b3b62a75a3d4f4716f5b1e100d28a597b | |
parent | 63840edb440a2caaea46091afbc92a0ed72e7b5e (diff) | |
download | httpd-e2e1d779179d1c9a053e61fa4a3776a5faf7d653.tar.gz |
* Avoid an overflow on large inputs
PR: 66033
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1900306 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | changes-entries/pr66033.txt | 2 | ||||
-rw-r--r-- | server/util.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/changes-entries/pr66033.txt b/changes-entries/pr66033.txt new file mode 100644 index 0000000000..caa98d18cd --- /dev/null +++ b/changes-entries/pr66033.txt @@ -0,0 +1,2 @@ + *) core: Avoid an overflow on large inputs in ap_is_matchexp. PR 66033 + [Ruediger Pluem] diff --git a/server/util.c b/server/util.c index c49274d656..c57258aeb3 100644 --- a/server/util.c +++ b/server/util.c @@ -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; } |