projects
/
platform
/
upstream
/
elfutils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ff1ce97
)
readelf: Correct overflow check for length in print_debug_aranges_section.
author
Mark Wielaard
<mjw@redhat.com>
Tue, 16 Dec 2014 15:30:59 +0000
(16:30 +0100)
committer
Mark Wielaard
<mjw@redhat.com>
Wed, 17 Dec 2014 15:49:02 +0000
(16:49 +0100)
Signed-off-by: Mark Wielaard <mjw@redhat.com>
src/ChangeLog
patch
|
blob
|
history
src/readelf.c
patch
|
blob
|
history
diff --git
a/src/ChangeLog
b/src/ChangeLog
index
112af19
..
576ed83
100644
(file)
--- a/
src/ChangeLog
+++ b/
src/ChangeLog
@@
-2,6
+2,7
@@
* readelf.c (print_debug_line_section): Correct overflow check for
unit_length.
+ (print_debug_aranges_section): Correct overflow check for length.
2014-12-15 Mark Wielaard <mjw@redhat.com>
diff --git
a/src/readelf.c
b/src/readelf.c
index
3c686d5
..
9c62853
100644
(file)
--- a/
src/readelf.c
+++ b/
src/readelf.c
@@
-4711,7
+4711,7
@@
print_debug_aranges_section (Dwfl_Module *dwflmod __attribute__ ((unused)),
printf (gettext ("\n Length: %6" PRIu64 "\n"),
(uint64_t) length);
- if (unlikely (
(ptrdiff_t) length > readendp - readp
))
+ if (unlikely (
length > (size_t) (readendp - readp)
))
goto invalid_data;
if (length == 0)