Skip to content
Snippets Groups Projects
Commit d56e433a authored by Alan Modra's avatar Alan Modra
Browse files

Re: Sanity check read_section_stabs_debugging_info

	* rddbg.c (read_section_stabs_debugging_info): Don't segfault on
	zero size string section.
parent 5a8b54ae
No related branches found
No related tags found
No related merge requests found
...@@ -147,6 +147,7 @@ read_section_stabs_debugging_info (bfd *abfd, asymbol **syms, long symcount, ...@@ -147,6 +147,7 @@ read_section_stabs_debugging_info (bfd *abfd, asymbol **syms, long symcount,
} }
/* Zero terminate the strings table, just in case. */ /* Zero terminate the strings table, just in case. */
strsize = bfd_section_size (strsec); strsize = bfd_section_size (strsec);
if (strsize != 0)
strings [strsize - 1] = 0; strings [strsize - 1] = 0;
if (shandle == NULL) if (shandle == NULL)
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment