mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #1126 (.lit Convert Failure)
This commit is contained in:
parent
817feebbc8
commit
ab6a567334
@ -543,7 +543,10 @@ class LitReader(object):
|
||||
raise LitError('Directory entry had 64bit name length.')
|
||||
if namelen > remaining - 3:
|
||||
raise LitError('Read past end of directory chunk')
|
||||
try:
|
||||
name, chunk = chunk[:namelen].decode('utf-8'), chunk[namelen:]
|
||||
except UnicodeDecodeError:
|
||||
break
|
||||
section, chunk, remaining = encint(chunk, remaining)
|
||||
offset, chunk, remaining = encint(chunk, remaining)
|
||||
size, chunk, remaining = encint(chunk, remaining)
|
||||
|
Loading…
x
Reference in New Issue
Block a user