diff --git a/gdb/coffread.c b/gdb/coffread.c index daae3ffe989..325c08760ba 100644 --- a/gdb/coffread.c +++ b/gdb/coffread.c @@ -1306,7 +1306,7 @@ getsymname (struct internal_syment *symbol_entry) if (symbol_entry->_n._n_n._n_zeroes == 0) { - if (symbol_entry->_n._n_n._n_offset > stringtab_length) + if (symbol_entry->_n._n_n._n_offset >= stringtab_length) error (_("COFF Error: string table offset (%s) outside string table (length %ld)"), hex_string (symbol_entry->_n._n_n._n_offset), stringtab_length); result = stringtab + symbol_entry->_n._n_n._n_offset;