blob: 503960215c3ce0b16eaec24c9ea2d6a3cfc6b68b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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;
/*
|