projects
/
external
/
binutils.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Catch potential integer overflow in readelf when processing corrupt binaries.
[external/binutils.git]
/
binutils
/
readelf.c
diff --git
a/binutils/readelf.c
b/binutils/readelf.c
index
b896ad9
..
e785fde
100644
(file)
--- a/
binutils/readelf.c
+++ b/
binutils/readelf.c
@@
-13366,7
+13366,7
@@
apply_relocations (Filedata * filedata,
}
rloc = start + rp->r_offset;
- if ((rloc + reloc_size) > end || (rloc < start))
+ if (
rloc >= end ||
(rloc + reloc_size) > end || (rloc < start))
{
warn (_("skipping invalid relocation offset 0x%lx in section %s\n"),
(unsigned long) rp->r_offset,