mirror of
https://github.com/clearlinux/systemd-stable.git
synced 2026-06-15 18:25:53 +00:00
efi: never call qsort on potentially NULL arrays
This commit is contained in:
committed by
Zbigniew Jędrzejewski-Szmek
parent
b0aa79e3d8
commit
d475d0fa21
@@ -383,7 +383,8 @@ int efi_get_boot_options(uint16_t **options) {
|
||||
list[count ++] = id;
|
||||
}
|
||||
|
||||
qsort(list, count, sizeof(uint16_t), cmp_uint16);
|
||||
if (list)
|
||||
qsort(list, count, sizeof(uint16_t), cmp_uint16);
|
||||
|
||||
*options = list;
|
||||
return count;
|
||||
|
||||
Reference in New Issue
Block a user