Skip to content

Commit

Permalink
Error out if symbol points to the end of stringtab
Browse files Browse the repository at this point in the history
  • Loading branch information
ssbssa committed Jul 7, 2024
1 parent c57eb9a commit 389946f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gdb/coffread.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 389946f

Please sign in to comment.