Changeset 20154


Ignore:
Timestamp:
2010-03-12T01:35:36+01:00 (8 years ago)
Author:
nbd
Message:

sstrip: fix a section length corruption bug (patch from #6847)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/sstrip/src/sstrip.c

    r15245 r20154  
    252252                        ESET(phdr->p_filesz,0); \ 
    253253                } else if (EGET(phdr->p_offset) + EGET(phdr->p_filesz) > newsize) { \ 
    254                         newsize -= EGET(phdr->p_offset); \ 
    255                         ESET(phdr->p_filesz, newsize); \ 
     254                        ESET(phdr->p_filesz, newsize - EGET(phdr->p_offset)); \ 
    256255                } \ 
    257256        } \ 
Note: See TracChangeset for help on using the changeset viewer.