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
* dwarf.c (process_extended_line_op): Do not assume that the
string extracted from the section is NUL terminated.
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;