summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/systemd/systemd/0001-sysctl-Don-t-pass-null-directive-argument-to-s.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/systemd/systemd/0001-sysctl-Don-t-pass-null-directive-argument-to-s.patch')
-rw-r--r--meta/recipes-core/systemd/systemd/0001-sysctl-Don-t-pass-null-directive-argument-to-s.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/meta/recipes-core/systemd/systemd/0001-sysctl-Don-t-pass-null-directive-argument-to-s.patch b/meta/recipes-core/systemd/systemd/0001-sysctl-Don-t-pass-null-directive-argument-to-s.patch
new file mode 100644
index 0000000000..0538c7bbc8
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0001-sysctl-Don-t-pass-null-directive-argument-to-s.patch
@@ -0,0 +1,31 @@
1From bfc4183ea995f1c211385d066cdb1fe9ce89f621 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 16 Dec 2018 20:53:38 -0800
4Subject: [PATCH 1/2] sysctl: Don't pass null directive argument to '%s'
5
6value pointer here is always NULL but subsequent use of that pointer
7with a %s format will always be NULL, printing p instead would be a
8valid string
9
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11---
12Upstream-Status: Submitted [https://github.com/systemd/systemd/pull/11179]
13 src/sysctl/sysctl.c | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16diff --git a/src/sysctl/sysctl.c b/src/sysctl/sysctl.c
17index 1cfe51018..c67d79032 100644
18--- a/src/sysctl/sysctl.c
19+++ b/src/sysctl/sysctl.c
20@@ -115,7 +115,7 @@ static int parse_file(OrderedHashmap *sysctl_options, const char *path, bool ign
21
22 value = strchr(p, '=');
23 if (!value) {
24- log_error("Line is not an assignment at '%s:%u': %s", path, c, value);
25+ log_error("Line is not an assignment at '%s:%u': %s", path, c, p);
26
27 if (r == 0)
28 r = -EINVAL;
29--
302.20.1
31