diff options
author | Maciej W. Rozycki <macro@imgtec.com> | 2017-02-23 18:16:55 +0000 |
---|---|---|
committer | Maciej W. Rozycki <macro@imgtec.com> | 2017-02-24 13:49:11 +0000 |
commit | 5235cd686141bb5adb57dbbf302a168e9693672b (patch) | |
tree | e7e7995321577fd0761c98d0528752208c397891 /binutils | |
parent | c9f02c3e29498fd9ecb1a9719c317c305fe509ae (diff) | |
download | gdb-5235cd686141bb5adb57dbbf302a168e9693672b.zip gdb-5235cd686141bb5adb57dbbf302a168e9693672b.tar.gz gdb-5235cd686141bb5adb57dbbf302a168e9693672b.tar.bz2 |
readelf: Make version section index sum unsigned
Make `isum' unsigned like data it is calculated from.
binutils/
* readelf.c (process_version_sections) <SHT_GNU_verdef>: Make
`isum' unsigned.
<SHT_GNU_verneed>: Likewise.
Diffstat (limited to 'binutils')
-rw-r--r-- | binutils/ChangeLog | 6 | ||||
-rw-r--r-- | binutils/readelf.c | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog index a528db4..1ab1c2c 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,5 +1,11 @@ 2017-02-24 Maciej W. Rozycki <macro@imgtec.com> + * readelf.c (process_version_sections) <SHT_GNU_verdef>: Make + `isum' unsigned. + <SHT_GNU_verneed>: Likewise. + +2017-02-24 Maciej W. Rozycki <macro@imgtec.com> + * readelf.c (process_version_sections) <SHT_GNU_verdef>: Limit the number of entries processed by the section size. Don't break out of the loop if `ent.vd_next' is 0. diff --git a/binutils/readelf.c b/binutils/readelf.c index cb0da10..6edb364 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -10026,8 +10026,8 @@ process_version_sections (FILE * file) Elf_Internal_Verdef ent; Elf_External_Verdaux * eaux; Elf_Internal_Verdaux aux; + unsigned int isum; int j; - int isum; /* Check for very large indices. */ if (idx > (size_t) (endbuf - (char *) edefs)) @@ -10143,8 +10143,8 @@ process_version_sections (FILE * file) { Elf_External_Verneed * entry; Elf_Internal_Verneed ent; + unsigned int isum; int j; - int isum; char * vstart; if (idx > (size_t) (endbuf - (char *) eneed)) |