Sfoglia il codice sorgente

eliminate (harmless in this case) vla usage in fnmatch.c

Rich Felker 13 anni fa
parent
commit
a6c399cf62
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      src/regex/fnmatch.c

+ 1 - 1
src/regex/fnmatch.c

@@ -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)))