projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
86c3bec
)
sd-device: fix device_get_properties_strv()
author
Tom Gundersen
<teg@jklm.no>
Wed, 27 May 2015 21:26:39 +0000
(23:26 +0200)
committer
Tom Gundersen
<teg@jklm.no>
Wed, 27 May 2015 21:30:02 +0000
(23:30 +0200)
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.
src/libsystemd/sd-device/device-private.c
patch
|
blob
|
history
diff --git
a/src/libsystemd/sd-device/device-private.c
b/src/libsystemd/sd-device/device-private.c
index
3cadedb
..
10370af
100644
(file)
--- 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;
}