projects
/
buildroot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a67a62c
)
sstrip: fix section length corruption bug
author
Peter Korsgaard
<jacmet@sunsite.dk>
Tue, 13 Jul 2010 11:10:39 +0000
(13:10 +0200)
committer
Peter Korsgaard
<jacmet@sunsite.dk>
Tue, 13 Jul 2010 11:10:39 +0000
(13:10 +0200)
Based on openwrt #6847:
https://dev.openwrt.org/ticket/6847
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
toolchain/sstrip/sstrip.c
patch
|
blob
|
history
diff --git
a/toolchain/sstrip/sstrip.c
b/toolchain/sstrip/sstrip.c
index 1842f053c6f1369a78ea0a83b5882fa965252067..03adc0eacf854dc787f937632489d4a153115356 100644
(file)
--- a/
toolchain/sstrip/sstrip.c
+++ b/
toolchain/sstrip/sstrip.c
@@
-253,8
+253,7
@@
static int modifyheaders ## CLASS (Elf ## CLASS ## _Ehdr *ehdr, \
ESET(phdr->p_offset,newsize); \
ESET(phdr->p_filesz,0); \
} else if (EGET(phdr->p_offset) + EGET(phdr->p_filesz) > newsize) { \
- newsize -= EGET(phdr->p_offset); \
- ESET(phdr->p_filesz, newsize); \
+ ESET(phdr->p_filesz, newsize - EGET(phdr->p_offset)); \
} \
} \
\