Re: Sanity check read_section_stabs_debugging_info
* rddbg.c (read_section_stabs_debugging_info): Don't segfault on
zero size string section.
diff --git a/binutils/rddbg.c b/binutils/rddbg.c
index f2ed6bc..1a88877 100644
--- a/binutils/rddbg.c
+++ b/binutils/rddbg.c
@@ -147,7 +147,8 @@
}
/* Zero terminate the strings table, just in case. */
strsize = bfd_section_size (strsec);
- strings [strsize - 1] = 0;
+ if (strsize != 0)
+ strings [strsize - 1] = 0;
if (shandle == NULL)
{
shandle = start_stab (dhandle, abfd, true, syms, symcount);