forked from pool/systemd
d76216e1f9
(please also push to 13.1, I want the same version as F20) - Add 0001-gpt-auto-generator-exit-immediately-if-in-container.patch: don't start gpt auto-generator in container (git). - Add 0001-manager-when-verifying-whether-clients-may-change-en.patch: fix reload check in selinux case (git). - Add 0001-logind-fix-bus-introspection-data-for-TakeControl.patch: fix introspection for TakeControl (git). - Add 0001-mount-check-for-NULL-before-reading-pm-what.patch: fix crash when parsing some incorrect unit (git). - Add 0001-shared-util-fix-off-by-one-error-in-tag_to_udev_node.patch: Fix udev rules parsing (git). - Add 0001-systemd-serialize-deserialize-forbid_restart-value.patch: Fix incorrect deserialization for forbid_restart (git). - Add 0001-core-unify-the-way-we-denote-serialization-attribute.patch: Ensure forbid_restart is named like other attributes (git). - Add 0001-journald-fix-minor-memory-leak.patch: fix memleak in journald (git). - Add 0001-do-not-accept-garbage-from-acpi-firmware-performance.patch: Improve ACPI firmware performance parsing (git). - Add 0001-journald-remove-rotated-file-from-hashmap-when-rotat.patch: Fix journal rotation (git). - Add 0001-login-fix-invalid-free-in-sd_session_get_vt.patch: Fix memory corruption in sd_session_get_vt (git). OBS-URL: https://build.opensuse.org/request/show/203387 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=454
36 lines
1.2 KiB
Diff
36 lines
1.2 KiB
Diff
From a0551d26ab5c6e0d5089b42a6319baef0e28ad92 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
|
Date: Mon, 14 Oct 2013 19:15:24 -0400
|
|
Subject: [PATCH] Fix bad assert in show_pid_array
|
|
|
|
This function should get the same treatment as other qsort uses
|
|
did in 7ff7394 "Never call qsort on potentially NULL arrays".
|
|
|
|
Reported-by: Oleksii Shevchuk <alxchk@gmail.com>
|
|
---
|
|
src/shared/cgroup-show.c | 4 +---
|
|
1 file changed, 1 insertion(+), 3 deletions(-)
|
|
|
|
Index: systemd-208/src/shared/cgroup-show.c
|
|
===================================================================
|
|
--- systemd-208.orig/src/shared/cgroup-show.c
|
|
+++ systemd-208/src/shared/cgroup-show.c
|
|
@@ -44,8 +44,6 @@ static void show_pid_array(int pids[], u
|
|
unsigned i, m, pid_width;
|
|
pid_t biggest = 0;
|
|
|
|
- assert(n_pids > 0);
|
|
-
|
|
/* Filter duplicates */
|
|
m = 0;
|
|
for (i = 0; i < n_pids; i++) {
|
|
@@ -65,7 +63,7 @@ static void show_pid_array(int pids[], u
|
|
pid_width = DECIMAL_STR_WIDTH(biggest);
|
|
|
|
/* And sort */
|
|
- qsort(pids, n_pids, sizeof(pid_t), compare);
|
|
+ qsort_safe(pids, n_pids, sizeof(pid_t), compare);
|
|
|
|
if(flags & OUTPUT_FULL_WIDTH)
|
|
n_columns = 0;
|