diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-10-02 19:38:09 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-10-02 19:45:12 +0200 |
commit | 62678deda2dcd43954bf02f783da01e48c7f8fce (patch) | |
tree | 8595c1103df9d0640b361b2d01e1188152793152 /src/shared | |
parent | b857193b1def5172e3641ca1d5bc9e08ae81aac4 (diff) |
efi: never call qsort on potentially NULL arrays
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/efivars.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/shared/efivars.c b/src/shared/efivars.c index 1d5b6f9e72..c015b16857 100644 --- a/src/shared/efivars.c +++ b/src/shared/efivars.c @@ -384,7 +384,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; |