diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2020-11-23 17:12:11 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2020-11-28 11:33:18 -0500 |
commit | 37d09c15401e0e4d2a836b8cce9659d4f11b2104 (patch) | |
tree | 48214e61058635133fc77fadfea1ea9722cb6602 /parse.c | |
parent | 4a5f626c3729eecf4a01c9cfc6e3392548263864 (diff) | |
download | bfs-37d09c15401e0e4d2a836b8cce9659d4f11b2104.tar.xz |
parse: Don't pass an uninitialized regex_t to regerror()
Diffstat (limited to 'parse.c')
-rw-r--r-- | parse.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); |