From ca463b87887d8151b83d222dc35d461991c1dd63 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sat, 21 Dec 2013 21:37:59 +0100 Subject: another musl fix round --- package/kmod/patches/patch-libkmod_libkmod-util_c | 24 +++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 package/kmod/patches/patch-libkmod_libkmod-util_c (limited to 'package/kmod/patches/patch-libkmod_libkmod-util_c') diff --git a/package/kmod/patches/patch-libkmod_libkmod-util_c b/package/kmod/patches/patch-libkmod_libkmod-util_c new file mode 100644 index 000000000..330fce456 --- /dev/null +++ b/package/kmod/patches/patch-libkmod_libkmod-util_c @@ -0,0 +1,24 @@ +--- kmod-15.orig/libkmod/libkmod-util.c 2013-07-15 17:45:31.000000000 +0200 ++++ kmod-15/libkmod/libkmod-util.c 2013-12-21 18:02:49.000000000 +0100 +@@ -28,6 +28,7 @@ + #include + #include + #include ++#include + #include + + #include "libkmod.h" +@@ -323,8 +324,12 @@ static inline int is_dir(const char *pat + int mkdir_p(const char *path, int len, mode_t mode) + { + char *start, *end; ++ char buf[PATH_MAX+1]; + +- start = strndupa(path, len); ++ snprintf(buf, sizeof buf, "%s", path); ++ assert(len < sizeof(buf)); ++ buf[len] = 0; ++ start = buf; + end = start + len; + + /* -- cgit v1.2.3