forked from Imagelibrary/binutils-gdb
ld: sprintf sanitizer null destination pointer
* configure.ac (stpcpy): AC_CHECK_DECLS. * sysdep.h (stpcpy): Add fallback declaraion. * config.in: Regenerate. * configure: Regenerate. * emultempl/pe.em (open_dynamic_archive): Use stpcpy rather than sprintf plus strlen. * emultempl/pep.em (open_dynamic_archive): Likewise. * emultempl/xtensaelf.em (elf_xtensa_before_allocation): Use auto rather than malloc'd buffer. Use sprintf count. * ldelf.c (ldelf_search_needed): Use memcpy in place of sprintf. * pe-dll.c (pe_process_import_defs): Use string already formed for alias match rather than recreating.
This commit is contained in:
10
ld/configure
vendored
10
ld/configure
vendored
@@ -16771,6 +16771,16 @@ fi
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_DECL_ENVIRON $ac_have_decl
|
||||
_ACEOF
|
||||
ac_fn_c_check_decl "$LINENO" "stpcpy" "ac_cv_have_decl_stpcpy" "$ac_includes_default"
|
||||
if test "x$ac_cv_have_decl_stpcpy" = xyes; then :
|
||||
ac_have_decl=1
|
||||
else
|
||||
ac_have_decl=0
|
||||
fi
|
||||
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_DECL_STPCPY $ac_have_decl
|
||||
_ACEOF
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user