commit 3fb0e50668571a9a546cd2c88bc11a0478c35e54
parent ce90cc57d46faa40232dd963213c021708ea0d0e
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sun, 16 Nov 2014 15:17:24 +0100
nl: fix crash on invalid regex
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git 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();
}