blob: 0538c7bbc8927255772a54db2f60f7ae99427701 [file] [log] [blame]
Brad Bishop977dc1a2019-02-06 16:01:43 -05001From 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