diff options
author | Tom Gundersen <teg@jklm.no> | 2015-05-27 23:26:39 +0200 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2015-05-27 23:30:02 +0200 |
commit | 0e3e60561395a8dd0464f9427d7fc9209bf3b007 (patch) | |
tree | f762921caaea653528388c7be211f2202fa87686 /src/libsystemd | |
parent | 86c3bece38bcf55da6387d20c6f01da9ad0284dc (diff) |
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.
Diffstat (limited to 'src/libsystemd')
-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 3cadedbf4a..10370af029 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; } |