don't use dynamic variable length array

This commit is contained in:
Yuichi Nishiwaki 2015-01-31 21:43:32 +09:00
parent 8e65a9db56
commit a7b3123405
1 changed files with 1 additions and 1 deletions

View File

@ -58,7 +58,7 @@ pic_regexp_regexp(pic_state *pic)
reg->flags = flags; reg->flags = flags;
if ((err = regcomp(&reg->reg, ptrn, cflags)) != 0) { if ((err = regcomp(&reg->reg, ptrn, cflags)) != 0) {
char errbuf[regerror(err, &reg->reg, NULL, 0)]; char errbuf[256];
regerror(err, &reg->reg, errbuf, sizeof errbuf); regerror(err, &reg->reg, errbuf, sizeof errbuf);
regexp_dtor(pic, &reg->reg); regexp_dtor(pic, &reg->reg);