projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
227bcd9
)
udevadm: fix segfault
author
Yu Watanabe
<watanabe.yu+github@gmail.com>
Sun, 13 Jan 2019 21:34:15 +0000
(06:34 +0900)
committer
Yu Watanabe
<watanabe.yu+github@gmail.com>
Sun, 13 Jan 2019 21:34:19 +0000
(06:34 +0900)
Fixes #11416.
src/udev/udevadm-monitor.c
patch
|
blob
|
history
diff --git
a/src/udev/udevadm-monitor.c
b/src/udev/udevadm-monitor.c
index f1b3e25cdda4d6a81664c8a85bff4adaa2c9e42d..3dde3f338a7460daa81e65bab700c32283f7494a 100644
(file)
--- a/
src/udev/udevadm-monitor.c
+++ b/
src/udev/udevadm-monitor.c
@@
-144,11
+144,11
@@
static int parse_argv(int argc, char *argv[]) {
slash = strchr(optarg, '/');
if (slash) {
- devtype = strdup(
devtype
+ 1);
+ devtype = strdup(
slash
+ 1);
if (!devtype)
return -ENOMEM;
- subsystem = strndup(optarg,
devtype
- optarg);
+ subsystem = strndup(optarg,
slash
- optarg);
} else
subsystem = strdup(optarg);