From f37f6ba19db229119ba3bd209dc10814dacf07b0 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Tue, 26 Jun 2018 01:21:43 -0500 Subject: system/kmod: pull in for mkinitfs --- system/kmod/strndupa.patch | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 system/kmod/strndupa.patch (limited to 'system/kmod/strndupa.patch') diff --git a/system/kmod/strndupa.patch b/system/kmod/strndupa.patch new file mode 100644 index 000000000..d4527140e --- /dev/null +++ b/system/kmod/strndupa.patch @@ -0,0 +1,15 @@ +diff --git a/libkmod/libkmod-util.c b/libkmod/libkmod-util.c +index df12433..142e767 100644 +--- a/shared/util.c ++++ b/shared/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; + + /* -- cgit v1.2.3-60-g2f50