From 5a03b213fb8555c84fdd13637b3d01547e78bcce Mon Sep 17 00:00:00 2001 From: "Markus F.X.J. Oberhumer" Date: Tue, 12 Dec 2006 07:50:05 +0100 Subject: [PATCH] More stricter check in xstrip.py. --- src/stub/scripts/xstrip.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/stub/scripts/xstrip.py b/src/stub/scripts/xstrip.py index d3e7e3dc..d6fbcae7 100644 --- a/src/stub/scripts/xstrip.py +++ b/src/stub/scripts/xstrip.py @@ -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]