chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Never call qsort on potentially NULL arrays
[elogind.git]
/
src
/
libsystemd-bus
/
bus-match.c
diff --git
a/src/libsystemd-bus/bus-match.c
b/src/libsystemd-bus/bus-match.c
index 1411167a7f4af4eb34368c36e458c639609f840f..916682aa62ba7642a1cd32ad26743ff32bd4cd12 100644
(file)
--- a/
src/libsystemd-bus/bus-match.c
+++ b/
src/libsystemd-bus/bus-match.c
@@
-768,7
+768,7
@@
int bus_match_parse(
}
/* Order the whole thing, so that we always generate the same tree */
}
/* Order the whole thing, so that we always generate the same tree */
- qsort(components, n_components, sizeof(struct bus_match_component), match_component_compare);
+ qsort
_safe
(components, n_components, sizeof(struct bus_match_component), match_component_compare);
/* Check for duplicates */
for (i = 0; i+1 < n_components; i++)
/* Check for duplicates */
for (i = 0; i+1 < n_components; i++)