forked from Imagelibrary/binutils-gdb
Silcence a compile time warning message building the binutils with gcc-10 on an s390 host.
* dwarf.c (display_debug_lines_decoded): Force a NUL termination of the truncated file name.
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
2020-02-07 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
|
* dwarf.c (display_debug_lines_decoded): Force a NUL termination
|
||||||
|
of the truncated file name.
|
||||||
|
|
||||||
2020-02-06 Andrew Burgess <andrew.burgess@embecosm.com>
|
2020-02-06 Andrew Burgess <andrew.burgess@embecosm.com>
|
||||||
|
|
||||||
* objdump.c (print_jump_visualisation): New function.
|
* objdump.c (print_jump_visualisation): New function.
|
||||||
|
|||||||
@@ -4905,6 +4905,11 @@ display_debug_lines_decoded (struct dwarf_section * section,
|
|||||||
strncpy (newFileName,
|
strncpy (newFileName,
|
||||||
fileName + fileNameLength - MAX_FILENAME_LENGTH,
|
fileName + fileNameLength - MAX_FILENAME_LENGTH,
|
||||||
MAX_FILENAME_LENGTH + 1);
|
MAX_FILENAME_LENGTH + 1);
|
||||||
|
/* FIXME: This is to pacify gcc-10 which can warn that the
|
||||||
|
strncpy above might leave a non-NUL terminated string
|
||||||
|
in newFileName. It won't, but gcc's analysis doesn't
|
||||||
|
quite go far enough to discover this. */
|
||||||
|
newFileName[MAX_FILENAME_LENGTH] = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user