X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/6d32c25e55533ffe115413ce0aed2474a0a4ccf1..658e7e8470b6d851fb4e119dd7de7a7952e57211:/tools/sstrip/src/sstrip.c?ds=sidebyside diff --git a/tools/sstrip/src/sstrip.c b/tools/sstrip/src/sstrip.c index 6607d1250..0508aaac8 100644 --- 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)); \ } \ } \ \