mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
MOBI Input: Ignore another form of corruption in trailing bytes. Fixes #2023943 [Private bug](https://bugs.launchpad.net/calibre/+bug/2023943)
This commit is contained in:
parent
98f9263f80
commit
1e249c2d47
@ -788,7 +788,10 @@ class MobiReader:
|
|||||||
flags >>= 1
|
flags >>= 1
|
||||||
if self.book_header.extra_flags & 1:
|
if self.book_header.extra_flags & 1:
|
||||||
off = size - num - 1
|
off = size - num - 1
|
||||||
num += (ord(data[off:off+1]) & 0x3) + 1
|
try:
|
||||||
|
num += (ord(data[off:off+1]) & 0x3) + 1
|
||||||
|
except TypeError:
|
||||||
|
num += 1
|
||||||
return num
|
return num
|
||||||
|
|
||||||
def warn_about_trailing_entry_corruption(self):
|
def warn_about_trailing_entry_corruption(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user