eliminate (harmless in this case) vla usage in fnmatch.c
authorRich Felker <dalias@aerifal.cx>
Sun, 5 Jun 2011 17:30:56 +0000 (13:30 -0400)
committerRich Felker <dalias@aerifal.cx>
Sun, 5 Jun 2011 17:30:56 +0000 (13:30 -0400)
src/regex/fnmatch.c

index 5f2fccdb083bfd477d14e7ad3c38f4130ef4a9fb..c0856f991939655b48ab0336090ee785b6c5713e 100644 (file)
@@ -102,7 +102,7 @@ int fnmatch(const char *p, const char *s, int flags)
                                        if (!*z || z-p > 32) { /* FIXME: symbolic const? */
                                                return FNM_NOMATCH;
                                        } else {
-                                               char class[z-p+1];
+                                               char class[33];
                                                memcpy(class, p, z-p);
                                                class[z-p] = 0;
                                                if (iswctype(k, wctype(class)))