Skip to content
Snippets Groups Projects
Commit 8af96044 authored by Simon McVittie's avatar Simon McVittie Committed by Vivek Das Mohapatra
Browse files

ld-libs: Avoid returning a pointer to undefined stack memory


With clang:
error: address of stack memory associated with local variable 'flags' returned [-Werror,-Wreturn-stack-address]

Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
parent 2c5efd9a
Branches
Tags
1 merge request!311Build capsule-capture-libs from a bundled copy of libcapsule
......@@ -47,10 +47,11 @@ static inline void sanitise_ldlibs(ld_libs_t *ldlibs)
ldlibs->prefix.path[ ldlibs->prefix.len ] = '\0';
}
// Note that this is not re-entrant. In this context we don't care.
static const char *
_rtldstr(int flag)
{
char flags[160] = { 0 };
static char flags[160] = { 0 };
char *f = &flags[0];
if( !flag)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment