summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2020-11-23 17:12:11 -0500
committerTavian Barnes <tavianator@tavianator.com>2020-11-28 11:33:18 -0500
commit37d09c15401e0e4d2a836b8cce9659d4f11b2104 (patch)
tree48214e61058635133fc77fadfea1ea9722cb6602
parent4a5f626c3729eecf4a01c9cfc6e3392548263864 (diff)
downloadbfs-37d09c15401e0e4d2a836b8cce9659d4f11b2104.tar.xz
parse: Don't pass an uninitialized regex_t to regerror()
-rw-r--r--parse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/parse.c b/parse.c
index 85bd232..aa4e175 100644
--- a/parse.c
+++ b/parse.c
@@ -2070,7 +2070,7 @@ static struct expr *parse_regex(struct parser_state *state, int flags, int arg2)
int err = regcomp(expr->regex, expr->sdata, state->regex_flags | flags);
if (err != 0) {
- char *str = xregerror(err, expr->regex);
+ char *str = xregerror(err, NULL);
if (str) {
parse_error(state, "${blu}%s${rs} ${bld}%s${rs}: %s.\n", expr->argv[0], expr->argv[1], str);
free(str);