From: Todd C. Miller Date: Fri, 31 Jul 2015 22:10:03 +0000 (-0600) Subject: Avoid a potential out of bounds read found by enh while fuzzing X-Git-Tag: SUDO_1_8_15^2~103 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1965da8c33bb278beea046c3abeeb0f0e6c91e70;p=sudo Avoid a potential out of bounds read found by enh while fuzzing with address sanitizer enabled. --- 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;