mirror of git://git.musl-libc.org/musl
eliminate (harmless in this case) vla usage in fnmatch.c
This commit is contained in:
parent
c74d306f47
commit
a6c399cf62
|
@ -102,7 +102,7 @@ int fnmatch(const char *p, const char *s, int flags)
|
||||||
if (!*z || z-p > 32) { /* FIXME: symbolic const? */
|
if (!*z || z-p > 32) { /* FIXME: symbolic const? */
|
||||||
return FNM_NOMATCH;
|
return FNM_NOMATCH;
|
||||||
} else {
|
} else {
|
||||||
char class[z-p+1];
|
char class[33];
|
||||||
memcpy(class, p, z-p);
|
memcpy(class, p, z-p);
|
||||||
class[z-p] = 0;
|
class[z-p] = 0;
|
||||||
if (iswctype(k, wctype(class)))
|
if (iswctype(k, wctype(class)))
|
||||||
|
|
Loading…
Reference in New Issue