1
0
mirror of https://github.com/upx/upx synced 2025-09-28 19:06:07 +08:00

More stricter check in xstrip.py.

This commit is contained in:
Markus F.X.J. Oberhumer 2006-12-12 07:50:05 +01:00
parent f270213246
commit 5a03b213fb

View File

@ -100,10 +100,11 @@ def do_file(fn):
raise Exception, "%s is not %s" % (fn, "ELF")
odata = None
pos = idata.find("\0.symtab\0.strtab\0.shstrtab\0")
if opts.dump:
eh, odata = strip_with_dump(eh, idata)
assert len(odata) == pos, "unexpected strip_with_dump"
else:
pos = idata.find("\0.symtab\0.strtab\0.shstrtab\0")
if pos >= 0:
odata = idata[:pos]