mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-27 16:43:09 +02:00
sstrip: fix a section length corruption bug (patch from #6847)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@20154 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
023a7d5f82
commit
5ad9c27d39
@ -251,8 +251,7 @@ static int modifyheaders ## CLASS (Elf ## CLASS ## _Ehdr *ehdr, \
|
|||||||
ESET(phdr->p_offset,newsize); \
|
ESET(phdr->p_offset,newsize); \
|
||||||
ESET(phdr->p_filesz,0); \
|
ESET(phdr->p_filesz,0); \
|
||||||
} else if (EGET(phdr->p_offset) + EGET(phdr->p_filesz) > newsize) { \
|
} else if (EGET(phdr->p_offset) + EGET(phdr->p_filesz) > newsize) { \
|
||||||
newsize -= EGET(phdr->p_offset); \
|
ESET(phdr->p_filesz, newsize - EGET(phdr->p_offset)); \
|
||||||
ESET(phdr->p_filesz, newsize); \
|
|
||||||
} \
|
} \
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
|
Loading…
Reference in New Issue
Block a user