projects
/
openwrt
/
staging
/
linusw.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a27a5a1
)
sstrip: fix a section length corruption bug (patch from #6847)
author
Felix Fietkau
<nbd@openwrt.org>
Fri, 12 Mar 2010 00:35:36 +0000
(
00:35
+0000)
committer
Felix Fietkau
<nbd@openwrt.org>
Fri, 12 Mar 2010 00:35:36 +0000
(
00:35
+0000)
SVN-Revision: 20154
tools/sstrip/src/sstrip.c
patch
|
blob
|
history
diff --git
a/tools/sstrip/src/sstrip.c
b/tools/sstrip/src/sstrip.c
index 6607d12500547787e4eacc230b1be4db2dfd823d..0508aaac81ec0a48ba524b444eaa368444ff2620 100644
(file)
--- a/
tools/sstrip/src/sstrip.c
+++ b/
tools/sstrip/src/sstrip.c
@@
-251,8
+251,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)); \
} \
} \
\