gdb/elfread: remove use of sprintf
When building on macOS, I get:
/Users/smarchi/src/binutils-gdb/gdb/elfread.c:813:3: error: 'sprintf' is deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Werror,-Wdeprecated-declarations]
813 | sprintf (name_got_plt, "%s" SYMBOL_GOT_PLT_SUFFIX, name);
| ^
Change this use of sprintf with an std::string, which also allows
getting rid of a use of alloca.
Change-Id: I296e25c863463ef05eca582c8303557570d63cf0
Approved-By: Andrew Burgess <aburgess@redhat.com>
1 file changed