You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
547 B

diff -u -r ../elfutils-0.166/src/unstrip.c ./src/unstrip.c
--- ../elfutils-0.166/src/unstrip.c 2016-01-12 07:49:19.000000000 -0500
+++ ./src/unstrip.c 2016-05-04 15:22:24.975567076 -0400
@@ -303,7 +304,11 @@
if (lastslash == path)
return;
- char *dir = strndupa (path, lastslash - path);
+ size_t substr_len = lastslash - path;
+ char *dir = alloca(substr_len+1);
+ strncpy(dir, path, substr_len);
+ dir[substr_len] = 0;
+
while (mkdir (dir, 0777) < 0 && errno != EEXIST)
if (errno == ENOENT)
make_directories (dir);