projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
47aaa2b
)
mdev: fix a case where we mangle device_path string and then use it.
author
Denys Vlasenko
<vda.linux@googlemail.com>
Fri, 1 May 2009 01:09:54 +0000
(
03:09
+0200)
committer
Denys Vlasenko
<vda.linux@googlemail.com>
Fri, 1 May 2009 01:09:54 +0000
(
03:09
+0200)
util-linux/mdev.c
patch
|
blob
|
history
diff --git
a/util-linux/mdev.c
b/util-linux/mdev.c
index 8fc8a3df4579cf6e4d580328511942c1fde805a5..e23828eea366999562d1911388aca4539fc127d7 100644
(file)
--- a/
util-linux/mdev.c
+++ b/
util-linux/mdev.c
@@
-564,7
+564,10
@@
int mdev_main(int argc UNUSED_PARAM, char **argv)
make_device(temp, 1);
}
else if (strcmp(action, "add") == 0) {
- make_device(temp, 0);
+ /* make_device mangles its parameter, use a copy */
+ char *s = xstrdup(temp);
+ make_device(s, 0);
+ free(s);
if (ENABLE_FEATURE_MDEV_LOAD_FIRMWARE) {
if (fw)
load_firmware(fw, temp);