aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Voss <thomas.voss@humanwave.nl> 2024-01-18 13:07:22 +0100
committerThomas Voss <thomas.voss@humanwave.nl> 2024-01-18 13:07:22 +0100
commit719b3e8ea5d35555be31b3fedcb3495b19a5856c (patch)
tree59bc817934395ed6263cfa3eea0cec3da0ac410a
parenteab742d92a140f6094aaff67cb08fa939138a983 (diff)
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.
-rw-r--r--src/grab.c2
1 files changed, 1 insertions, 1 deletions
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);
}