commit 3fb0e50668571a9a546cd2c88bc11a0478c35e54 Author: Hiltjo Posthuma <[email protected]> Date: Sun Nov 16 15:17:24 2014 +0100
nl: fix crash on invalid regex
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();
}
