diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2009-11-17 20:48:31 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2009-11-17 20:48:31 +0000 |
commit | 5409dacfb9b62964f95af8c693fa708baf60ecdd (patch) | |
tree | e5f72557eb76cddea6c0a542803f720ebc9f1405 /gdb/dbxread.c | |
parent | a231ddc0b3e0c5ccb3fa1d24b18d4f0d35977e4e (diff) | |
download | gdb-5409dacfb9b62964f95af8c693fa708baf60ecdd.zip gdb-5409dacfb9b62964f95af8c693fa708baf60ecdd.tar.gz gdb-5409dacfb9b62964f95af8c693fa708baf60ecdd.tar.bz2 |
* dbxread.c (set_namestring): Remove cast to unsigned. Check N_STRX
overflow.
Diffstat (limited to 'gdb/dbxread.c')
-rw-r--r-- | gdb/dbxread.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/dbxread.c b/gdb/dbxread.c index 54d8b51..6d4c893 100644 --- a/gdb/dbxread.c +++ b/gdb/dbxread.c @@ -965,8 +965,9 @@ set_namestring (struct objfile *objfile, const struct internal_nlist *nlist) { char *namestring; - if (((unsigned) nlist->n_strx + file_string_table_offset) - >= DBX_STRINGTAB_SIZE (objfile)) + if (nlist->n_strx + file_string_table_offset + >= DBX_STRINGTAB_SIZE (objfile) + || nlist->n_strx + file_string_table_offset < nlist->n_strx) { complaint (&symfile_complaints, _("bad string table offset in symbol %d"), symnum); |