From e2e1d779179d1c9a053e61fa4a3776a5faf7d653 Mon Sep 17 00:00:00 2001 From: Ruediger Pluem Date: Wed, 27 Apr 2022 06:35:02 +0000 Subject: * 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 --- server/util.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'server') 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; } -- cgit v1.2.1