aboutsummaryrefslogtreecommitdiff
path: root/binutils/nm.c
diff options
context:
space:
mode:
Diffstat (limited to 'binutils/nm.c')
-rw-r--r--binutils/nm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/binutils/nm.c b/binutils/nm.c
index fcbab41..7ddcc8a 100644
--- a/binutils/nm.c
+++ b/binutils/nm.c
@@ -685,7 +685,8 @@ size_forward1 (const void *P_x, const void *P_y)
#define file_symbol(s, sn, snl) \
(((s)->flags & BSF_FILE) != 0 \
- || ((sn)[(snl) - 2] == '.' \
+ || ((snl) > 2 \
+ && (sn)[(snl) - 2] == '.' \
&& ((sn)[(snl) - 1] == 'o' \
|| (sn)[(snl) - 1] == 'a')))