Skip to content

Commit 389946f

Browse files
committed
Error out if symbol points to the end of stringtab
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30668
1 parent c57eb9a commit 389946f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

gdb/coffread.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1306,7 +1306,7 @@ getsymname (struct internal_syment *symbol_entry)
13061306

13071307
if (symbol_entry->_n._n_n._n_zeroes == 0)
13081308
{
1309-
if (symbol_entry->_n._n_n._n_offset > stringtab_length)
1309+
if (symbol_entry->_n._n_n._n_offset >= stringtab_length)
13101310
error (_("COFF Error: string table offset (%s) outside string table (length %ld)"),
13111311
hex_string (symbol_entry->_n._n_n._n_offset), stringtab_length);
13121312
result = stringtab + symbol_entry->_n._n_n._n_offset;

0 commit comments

Comments
 (0)