|
Zbigniew Jędrzejewski-Szmek |
436654 |
From 864dfcd49d764866a9795ea6e3f39c1f7c85b509 Mon Sep 17 00:00:00 2001
|
|
Zbigniew Jędrzejewski-Szmek |
436654 |
From: Tom Gundersen <teg@jklm.no>
|
|
Zbigniew Jędrzejewski-Szmek |
436654 |
Date: Wed, 27 May 2015 23:26:39 +0200
|
|
Zbigniew Jędrzejewski-Szmek |
436654 |
Subject: [PATCH] sd-device: fix device_get_properties_strv()
|
|
Zbigniew Jędrzejewski-Szmek |
436654 |
MIME-Version: 1.0
|
|
Zbigniew Jędrzejewski-Szmek |
436654 |
Content-Type: text/plain; charset=UTF-8
|
|
Zbigniew Jędrzejewski-Szmek |
436654 |
Content-Transfer-Encoding: 8bit
|
|
Zbigniew Jędrzejewski-Szmek |
436654 |
|
|
Zbigniew Jędrzejewski-Szmek |
436654 |
A NULL pointer was inserted as the first element of the strv.
|
|
Zbigniew Jędrzejewski-Szmek |
436654 |
|
|
Zbigniew Jędrzejewski-Szmek |
436654 |
This had the effect of always passing the empty environment to processes
|
|
Zbigniew Jędrzejewski-Szmek |
436654 |
spawned by udev.
|
|
Zbigniew Jędrzejewski-Szmek |
436654 |
|
|
Zbigniew Jędrzejewski-Szmek |
436654 |
Reported by Michał Bartoszkiewicz.
|
|
Zbigniew Jędrzejewski-Szmek |
436654 |
|
|
Zbigniew Jędrzejewski-Szmek |
436654 |
(cherry picked from commit 0e3e60561395a8dd0464f9427d7fc9209bf3b007)
|
|
Zbigniew Jędrzejewski-Szmek |
436654 |
---
|
|
Zbigniew Jędrzejewski-Szmek |
436654 |
src/libsystemd/sd-device/device-private.c | 2 +-
|
|
Zbigniew Jędrzejewski-Szmek |
436654 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
Zbigniew Jędrzejewski-Szmek |
436654 |
|
|
Zbigniew Jędrzejewski-Szmek |
436654 |
diff --git a/src/libsystemd/sd-device/device-private.c b/src/libsystemd/sd-device/device-private.c
|
|
Zbigniew Jędrzejewski-Szmek |
436654 |
index 3cadedbf4a..10370af029 100644
|
|
Zbigniew Jędrzejewski-Szmek |
436654 |
--- a/src/libsystemd/sd-device/device-private.c
|
|
Zbigniew Jędrzejewski-Szmek |
436654 |
+++ b/src/libsystemd/sd-device/device-private.c
|
|
Zbigniew Jędrzejewski-Szmek |
436654 |
@@ -659,7 +659,7 @@ static int device_update_properties_bufs(sd_device *device) {
|
|
Zbigniew Jędrzejewski-Szmek |
436654 |
if (!buf_strv)
|
|
Zbigniew Jędrzejewski-Szmek |
436654 |
return -ENOMEM;
|
|
Zbigniew Jędrzejewski-Szmek |
436654 |
|
|
Zbigniew Jędrzejewski-Szmek |
436654 |
- buf_strv[++ strv_size] = (char *)&buf_nulstr[nulstr_len];
|
|
Zbigniew Jędrzejewski-Szmek |
436654 |
+ buf_strv[strv_size ++] = (char *)&buf_nulstr[nulstr_len];
|
|
Zbigniew Jędrzejewski-Szmek |
436654 |
strscpyl((char *)buf_nulstr + nulstr_len, len + 1, prop, "=", val, NULL);
|
|
Zbigniew Jędrzejewski-Szmek |
436654 |
nulstr_len += len + 1;
|
|
Zbigniew Jędrzejewski-Szmek |
436654 |
}
|