aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-05-27 23:26:39 +0200
committerMike Gilbert <floppym@gentoo.org>2015-05-27 22:51:05 -0400
commit580b4456dd8b8633a11ea69132e3b0d39fb4b40a (patch)
tree534bffcae80703f5ee5c049b8ccc0e87e7f94521
parentudevd: fix SIGCHLD handling in --daemon mode (diff)
downloadsystemd-580b4456dd8b8633a11ea69132e3b0d39fb4b40a.tar.gz
systemd-580b4456dd8b8633a11ea69132e3b0d39fb4b40a.tar.bz2
systemd-580b4456dd8b8633a11ea69132e3b0d39fb4b40a.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.c2
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;
}