Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2019-12-24 07:40:53 -0500
committerAllan McRae <allan@archlinux.org>2020-01-07 11:40:32 +1000
commitffb69c700abd6eb3b86e79e09b135029ff9104b4 (patch)
tree7a73d007b7d5849fbc3f7b791e68bf7b90f8e8a5
parent56e0763c6d1d248b986ac22836de5ede0a805cfb (diff)
Ensure regex object is always initialized
This avoids a crash in filetarget_free() when regex support isn't requested in files_search().
-rw-r--r--src/pacman/files.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pacman/files.c b/src/pacman/files.c
index 7b0c884b..cae7130d 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 = {0};
if(exact_file) {
while(len > 1 && targ[0] == '/') {