On Fri, 31 Jul 2015 21:16:51 +0200, Stefan Sperling wrote:

> That's much cleaner and I can confirm it fixes the issue.
> Can we move the break on the next line? Apart from that, ok with me.

Sure.  I also verified the fix with valgrind.

 - todd

Index: lib/libc/gen/fnmatch.c
===================================================================
RCS file: /cvs/src/lib/libc/gen/fnmatch.c,v
retrieving revision 1.18
diff -u -p -u -r1.18 fnmatch.c
--- lib/libc/gen/fnmatch.c      11 Dec 2014 16:25:34 -0000      1.18
+++ lib/libc/gen/fnmatch.c      31 Jul 2015 20:38:17 -0000
@@ -192,6 +192,8 @@ static int fnmatch_ch(const char **patte
                 result = 0;
                 continue;
             }
+            if (!**pattern)
+                break;
 
 leadingclosebrace:
             /* Look at only well-formed range patterns; 

Reply via email to