+2014-12-16 Mark Wielaard <mjw@redhat.com>
+
+ * dwarf_getsrclines.c (read_srclines): Correct overflow check for
+ unit_length.
+
2014-12-15 Mark Wielaard <mjw@redhat.com>
* dwarf_getpubnames.c (get_offsets): Make sure whole unit fall inside
}
/* Check whether we have enough room in the section. */
- if (unit_length < 2 + length + 5 * 1
- || unlikely (linep + unit_length > lineendp))
+ if (unlikely (unit_length > (size_t) (lineendp - linep)
+ || unit_length < 2 + length + 5 * 1))
goto invalid_data;
lineendp = linep + unit_length;
+2014-12-16 Mark Wielaard <mjw@redhat.com>
+
+ * readelf.c (print_debug_line_section): Correct overflow check for
+ unit_length.
+
2014-12-15 Mark Wielaard <mjw@redhat.com>
* readelf.c (notice_listptr): Return false if offset doesn't fit
}
/* Check whether we have enough room in the section. */
- if (unit_length < 2 + length + 5 * 1
- || unlikely (linep + unit_length > lineendp))
+ if (unlikely (unit_length > (size_t) (lineendp - linep)
+ || unit_length < 2 + length + 5 * 1))
goto invalid_data;
lineendp = linep + unit_length;