[pacman-dev] [PATCH] Ensure regex object is always initialized
24 Dec
2019
24 Dec
'19
12:45 p.m.
This avoids a crash in filetarget_free() when regex support isn't requested in files_search(). --- src/pacman/files.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pacman/files.c b/src/pacman/files.c index 7b0c884b..29b593be 100644 --- a/src/pacman/files.c +++ b/src/pacman/files.c @@ -114,7 +114,7 @@ static int files_search(alpm_list_t *syncs, alpm_list_t *targets, int regex) { char *targ = t->data; size_t len = strlen(targ); int exact_file = strchr(targ, '/') != NULL; - regex_t reg; + regex_t reg = {}; if(exact_file) { while(len > 1 && targ[0] == '/') { -- 2.24.1
1824
Age (days ago)
1824
Last active (days ago)
0 comments
1 participants
participants (1)
-
Dave Reisner