chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b857193
)
efi: never call qsort on potentially NULL arrays
author
Lennart Poettering
<lennart@poettering.net>
Wed, 2 Oct 2013 17:38:09 +0000
(19:38 +0200)
committer
Lennart Poettering
<lennart@poettering.net>
Wed, 2 Oct 2013 17:45:12 +0000
(19:45 +0200)
src/shared/efivars.c
patch
|
blob
|
history
diff --git
a/src/shared/efivars.c
b/src/shared/efivars.c
index 1d5b6f9e72f722f092c8adb8c1c2e533fcb52647..c015b168579ebb25c8eace507c775b572d79a317 100644
(file)
--- 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;
}
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;
*options = list;
return count;