readelf: Make version section index sum unsigned
authorMaciej W. Rozycki <macro@imgtec.com>
Thu, 23 Feb 2017 18:16:55 +0000 (18:16 +0000)
committerMaciej W. Rozycki <macro@imgtec.com>
Fri, 24 Feb 2017 13:49:11 +0000 (13:49 +0000)
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.

binutils/ChangeLog
binutils/readelf.c

index a528db4207f5c2067275d21d86c89f14da4a6fb0..1ab1c2c8b9234118b5ee04ce0eed37d0aea78719 100644 (file)
@@ -1,3 +1,9 @@
+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
index cb0da10194ca40cebb3bf64e2eaaa23f2cc16bce..6edb364ef665ff7e6ff092d17cb2f662eef2b843 100644 (file)
@@ -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))