From 3fb0e50668571a9a546cd2c88bc11a0478c35e54 Mon Sep 17 00:00:00 2001 From: Hiltjo Posthuma Date: Sun, 16 Nov 2014 15:17:24 +0100 Subject: [PATCH] nl: fix crash on invalid regex --- nl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nl.c b/nl.c index 06c2aa4..3557362 100644 --- a/nl.c +++ b/nl.c @@ -33,7 +33,7 @@ main(int argc, char *argv[]) r = EARGF(usage()); mode = r[0]; if (r[0] == 'p') { - regcomp(&preg, &r[1], REG_NOSUB); + eregcomp(&preg, &r[1], REG_NOSUB); } else if (!strchr("ant", mode)) { usage(); }