Control: tags -1 fixed-upstream patch

Am 30.05.2015 um 17:43 schrieb Michael Biebl:
> A quick experiment shows, that inside net.agent, no environment variable
> besides PWD=/ is set anymore.

Fix by upstream commit

commit 0e3e60561395a8dd0464f9427d7fc9209bf3b007
Author: Tom Gundersen <[email protected]>
Date:   Wed May 27 23:26:39 2015 +0200

    sd-device: fix device_get_properties_strv()

    A NULL pointer was inserted as the first element of the strv.

    This had the effect of always passing the empty environment to processes
    spawned by udev.

    Reported by Michał Bartoszkiewicz.



-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?
From: Tom Gundersen <[email protected]>
Date: Wed, 27 May 2015 23:26:39 +0200
Subject: sd-device: fix device_get_properties_strv()
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

A NULL pointer was inserted as the first element of the strv.

This had the effect of always passing the empty environment to processes
spawned by udev.

Reported by Michał Bartoszkiewicz.

(cherry-picked from commit 0e3e60561395a8dd0464f9427d7fc9209bf3b007)
---
 src/libsystemd/sd-device/device-private.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/libsystemd/sd-device/device-private.c b/src/libsystemd/sd-device/device-private.c
index 3cadedb..10370af 100644
--- a/src/libsystemd/sd-device/device-private.c
+++ b/src/libsystemd/sd-device/device-private.c
@@ -659,7 +659,7 @@ static int device_update_properties_bufs(sd_device *device) {
                 if (!buf_strv)
                         return -ENOMEM;
 
-                buf_strv[++ strv_size] = (char *)&buf_nulstr[nulstr_len];
+                buf_strv[strv_size ++] = (char *)&buf_nulstr[nulstr_len];
                 strscpyl((char *)buf_nulstr + nulstr_len, len + 1, prop, "=", val, NULL);
                 nulstr_len += len + 1;
         }

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to