Skip to content

Commit

Permalink
Fixed crash when st_info_list is NULL. Fixes dinhvh#420. Fixes CVE-20…
Browse files Browse the repository at this point in the history
  • Loading branch information
dinhvh committed Dec 19, 2022
1 parent 0c39020 commit 5c9eb6b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/low-level/imap/mailimap_types.c
Original file line number Diff line number Diff line change
Expand Up @@ -1389,9 +1389,11 @@ void
mailimap_mailbox_data_status_free(struct mailimap_mailbox_data_status * info)
{
mailimap_mailbox_free(info->st_mailbox);
clist_foreach(info->st_info_list, (clist_func) mailimap_status_info_free,
NULL);
clist_free(info->st_info_list);
if (info->st_info_list != NULL) {
clist_foreach(info->st_info_list, (clist_func) mailimap_status_info_free,
NULL);
clist_free(info->st_info_list);
}
free(info);
}

Expand Down

0 comments on commit 5c9eb6b

Please sign in to comment.