From fe733d66cf29152d113c6ad5ef60473cfd3f042b Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 23 Jul 2011 01:14:55 -0600 Subject: [PATCH] ... --- src/calibre/ebooks/mobi/debug.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/calibre/ebooks/mobi/debug.py b/src/calibre/ebooks/mobi/debug.py index 790c8dd45b..b6c7991739 100644 --- a/src/calibre/ebooks/mobi/debug.py +++ b/src/calibre/ebooks/mobi/debug.py @@ -638,6 +638,9 @@ class IndexEntry(object): # {{{ self.tags.append(Tag(aut_tag[0], [val], self.entry_type, cncx)) + if raw.replace(b'\x00', b''): + raise ValueError('Extra bytes in INDX table entry %d: %r'%(self.index, raw)) + @property def label(self): for tag in self.tags: