SHA256
1
0
forked from pool/systemd
systemd/0011-strv-don-t-access-potentially-NULL-string-arrays.patch
Marcus Meissner 656aca6436 Accepting request 202117 from home:fcrozat:branches:Base:System
- Add 0001-acpi-fptd-fix-memory-leak-in-acpi_get_boot_usec.patch:
  fix acpi memleak.
- Add
  0002-fix-lingering-references-to-var-lib-backlight-random.patch:
  fix invalid path in documentation.
- Add
  0003-acpi-make-sure-we-never-free-an-uninitialized-pointe.patch:
  fix invalid memory free.
- Add 0004-systemctl-fix-name-mangling-for-sysv-units.patch: fix
  name mangling for sysv units.
- Add
  0005-cryptsetup-fix-OOM-handling-when-parsing-mount-optio.patch:
  fix OOM handling.
- Add 0006-journald-add-missing-error-check.patch: add missing
  error check.
- Add 0007-bus-fix-potentially-uninitialized-memory-access.patch:
  fix uninitialized memory access.
- Add 0008-dbus-fix-return-value-of-dispatch_rqueue.patch: fix
  return value.
- Add 0009-modules-load-fix-error-handling.patch: fix error
  handling.
- Add 0010-efi-never-call-qsort-on-potentially-NULL-arrays.patch:
  fix incorrect memory access.
- Add 0011-strv-don-t-access-potentially-NULL-string-arrays.patch:
  fix incorrect memory access.
- Add
  0012-mkdir-pass-a-proper-function-pointer-to-mkdir_safe_i.patch:
  fix invalid pointer.
- Add
  0014-tmpfiles.d-include-setgid-perms-for-run-log-journal.patch:

OBS-URL: https://build.opensuse.org/request/show/202117
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=452
2013-10-04 12:28:12 +00:00

28 lines
689 B
Diff

From 5b4fb02d890d5c9777e9a6e798e0b8922a8a9fd8 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Wed, 2 Oct 2013 19:38:28 +0200
Subject: [PATCH 11/15] strv: don't access potentially NULL string arrays
---
src/shared/env-util.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/shared/env-util.c b/src/shared/env-util.c
index 5e29629..7976881 100644
--- a/src/shared/env-util.c
+++ b/src/shared/env-util.c
@@ -405,7 +405,9 @@ char **strv_env_clean_log(char **e, const char *message) {
e[k++] = *p;
}
- e[k] = NULL;
+ if (e)
+ e[k] = NULL;
+
return e;
}
--
1.8.4