PR binutils/21437
* readelf.c (process_version_sections): Check for underflow when
computing the start address of the auxillary version data.
+2017-04-28 Nick Clifton <nickc@redhat.com>
+
+ PR binutils/21437
+ * readelf.c (process_version_sections): Check for underflow when
+ computing the start address of the auxillary version data.
+
2017-04-28 Nick Clifton <nickc@redhat.com>
PR binutils/21438
printf (_(" Index: %d Cnt: %d "),
ent.vd_ndx, ent.vd_cnt);
- /* Check for overflow. */
- if (ent.vd_aux + sizeof (* eaux) > (size_t) (endbuf - vstart))
+ /* Check for overflow and underflow. */
+ if (ent.vd_aux + sizeof (* eaux) > (size_t) (endbuf - vstart)
+ || (vstart + ent.vd_aux < vstart))
break;
vstart += ent.vd_aux;