readelf: Make sure readp is smaller than cieend in print_debug_frame_section.
authorMark Wielaard <mark@klomp.org>
Tue, 16 Oct 2018 12:22:33 +0000 (14:22 +0200)
committerMark Wielaard <mark@klomp.org>
Fri, 19 Oct 2018 22:32:14 +0000 (00:32 +0200)
We could end up with a negative length in a call to memchr.

https://sourceware.org/bugzilla/show_bug.cgi?id=23782

Signed-off-by: Mark Wielaard <mark@klomp.org>
src/ChangeLog

index 0cbcf80..602312e 100644 (file)
@@ -1,3 +1,8 @@
+2018-10-16  Mark Wielaard  <mark@klomp.org>
+
+       * readelf.c (print_debug_frame_section): Make sure readp is never
+       greater than cieend.
+
 2018-10-19  Mark Wielaard  <mark@klomp.org>
 
        * dwfl_module_getdwarf.c (adjust_relocs): Check sh_entsize is not