diff options
Diffstat (limited to 'main/kmod/strndupa.patch')
-rw-r--r-- | main/kmod/strndupa.patch | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/main/kmod/strndupa.patch b/main/kmod/strndupa.patch new file mode 100644 index 0000000000..503960215c --- /dev/null +++ b/main/kmod/strndupa.patch @@ -0,0 +1,15 @@ +diff --git a/libkmod/libkmod-util.c b/libkmod/libkmod-util.c +index df12433..142e767 100644 +--- a/libkmod/libkmod-util.c ++++ b/libkmod/libkmod-util.c +@@ -334,7 +334,9 @@ int mkdir_p(const char *path, int len, mode_t mode) + { + char *start, *end; + +- start = strndupa(path, len); ++ start = alloca(len+1); ++ strncpy(start, path, len); ++ start[len] = '\0'; + end = start + len; + + /* |