diff options
author | 2015-05-27 23:26:39 +0200 | |
---|---|---|
committer | 2015-05-27 22:51:05 -0400 | |
commit | 580b4456dd8b8633a11ea69132e3b0d39fb4b40a (patch) | |
tree | 534bffcae80703f5ee5c049b8ccc0e87e7f94521 | |
parent | udevd: fix SIGCHLD handling in --daemon mode (diff) | |
download | systemd-gentoo-220.tar.gz systemd-gentoo-220.tar.bz2 systemd-gentoo-220.zip |
sd-device: fix device_get_properties_strv()gentoo-220
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.
-rw-r--r-- | src/libsystemd/sd-device/device-private.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsystemd/sd-device/device-private.c b/src/libsystemd/sd-device/device-private.c index 3cadedbf4..10370af02 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; } |