diff --git a/contrib/10.regexp/src/regexp.c b/contrib/10.regexp/src/regexp.c index 8c98bb2b..d3942ca7 100644 --- a/contrib/10.regexp/src/regexp.c +++ b/contrib/10.regexp/src/regexp.c @@ -58,7 +58,7 @@ pic_regexp_regexp(pic_state *pic) reg->flags = flags; if ((err = regcomp(®->reg, ptrn, cflags)) != 0) { - char errbuf[regerror(err, ®->reg, NULL, 0)]; + char errbuf[256]; regerror(err, ®->reg, errbuf, sizeof errbuf); regexp_dtor(pic, ®->reg);