kmod/shared
Emil Velikov b27aa3fb5a shared: use memdup over stdndupa
The stdndupa has a couple of gotchas:
 - allocates memory on stack via alloca(3)... where we pass it a
   user-provided string in at least one instance
 - it's a GNU extension missing on musl and bionic

The mkdir_p() function is not a hot path, so using heap allocation is
perfectly fine. Swap the stdndupa for our local helper memdup.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/92
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
2024-09-02 08:55:40 -05:00
..
.gitignore Move generic util functions to shared directory 2014-10-03 00:33:25 -03:00
array.c shared: unify array trim handling 2024-08-16 00:00:26 -05:00
array.h shared: switch array API to size_t 2024-08-16 00:00:00 -05:00
hash.c Drop the one line short description on sources 2024-07-26 13:41:56 -05:00
hash.h Move hash implementation to shared directory 2014-10-03 00:40:11 -03:00
macro.h Drop the one line short description on sources 2024-07-26 13:41:56 -05:00
missing.h shared: use memdup over stdndupa 2024-09-02 08:55:40 -05:00
scratchbuf.c Drop the one line short description on sources 2024-07-26 13:41:56 -05:00
scratchbuf.h shared: make scratchbuf_str static 2016-11-10 22:14:27 -02:00
strbuf.c Drop the one line short description on sources 2024-07-26 13:41:56 -05:00
strbuf.h shared: rename prefixes of strbuf functions 2014-10-11 13:25:51 -03:00
util.c shared: use memdup over stdndupa 2024-09-02 08:55:40 -05:00
util.h testsuite/path: match the full rootpath 2024-08-23 13:51:19 -05:00