From 1965da8c33bb278beea046c3abeeb0f0e6c91e70 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Fri, 31 Jul 2015 16:10:03 -0600 Subject: [PATCH] Avoid a potential out of bounds read found by enh while fuzzing with address sanitizer enabled. --- lib/util/fnmatch.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/util/fnmatch.c b/lib/util/fnmatch.c index 8861937d4..18855992d 100644 --- a/lib/util/fnmatch.c +++ b/lib/util/fnmatch.c @@ -188,6 +188,8 @@ static int fnmatch_ch(const char **pattern, const char **string, int flags) result = 0; continue; } + if (!**pattern) + break; leadingclosebrace: /* Look at only well-formed range patterns; -- 2.40.0