← Commit list

05ae40083

Denys Vlasenko
Denys Vlasenko
2009-05-01
FAILED Duration: 39s

Subject

mdev: fix a case where we mangle device_path string and then use it.

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

util-linux/mdev.c+4 -1
@@ -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);