aboutsummaryrefslogtreecommitdiff
path: root/binutils/rddbg.c
diff options
context:
space:
mode:
Diffstat (limited to 'binutils/rddbg.c')
-rw-r--r--binutils/rddbg.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/binutils/rddbg.c b/binutils/rddbg.c
index 1d8c447..b978060 100644
--- a/binutils/rddbg.c
+++ b/binutils/rddbg.c
@@ -303,7 +303,8 @@ read_symbol_stabs_debugging_info (bfd *abfd, asymbol **syms, long symcount,
return FALSE;
f = NULL;
- while (s[strlen (s) - 1] == '\\'
+ while (strlen (s) > 0
+ && s[strlen (s) - 1] == '\\'
&& ps + 1 < symend)
{
char *sc, *n;