From 7ff7394d9e4e9189c30fd018235e6b1728c6f2d0 Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Fri, 11 Oct 2013 19:33:13 -0400 Subject: Never call qsort on potentially NULL arrays This extends 62678ded 'efi: never call qsort on potentially NULL arrays' to all other places where qsort is used and it is not obvious that the count is non-zero. --- src/libsystemd-bus/bus-match.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libsystemd-bus/bus-match.c') diff --git a/src/libsystemd-bus/bus-match.c b/src/libsystemd-bus/bus-match.c index 1411167a7f..916682aa62 100644 --- 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 */ - 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++) -- cgit v1.2.3-54-g00ecf