[hackers] [sbase] nl: fix crash on invalid regex || Hiltjo Posthuma
commit 3fb0e50668571a9a546cd2c88bc11a0478c35e54
Author: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
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
_AT_@ -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();
}
Received on Sun Nov 16 2014 - 15:37:04 CET
This archive was generated by hypermail 2.3.0
: Sun Nov 16 2014 - 15:48:09 CET