From 719b3e8ea5d35555be31b3fedcb3495b19a5856c Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Thu, 18 Jan 2024 13:07:22 +0100 Subject: Increase emsg buffer size 128 should be enough, but the PCRE grep implementation by the grep developers use 256, so that might be a safer bet. --- src/grab.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/grab.c b/src/grab.c index cf5ff6f..0686bf6 100644 --- a/src/grab.c +++ b/src/grab.c @@ -456,7 +456,7 @@ mkregex(char *s, size_t n) if (nflag) cflags |= REG_NEWLINE; if ((ret = regcomp(&r, s, cflags)) != 0) { - char emsg[128]; + char emsg[256]; regerror(ret, &r, emsg, sizeof(emsg)); diex("Failed to compile regex: %s", emsg); } -- cgit v1.2.3