#941183 libepub0: baloo_file_extractor segfault because of null pointer deference in ebook-tools libepub/list.c

Package:
libepub0
Source:
ebook-tools
Description:
library to work with the EPUB file format - runtime library
Submitter:
Paul Ezvan
Date:
2019-09-26 04:09:05 UTC
Severity:
normal
#941183#5
Date:
2019-09-26 03:59:35 UTC
From:
To:
Dear Maintainer,

baloo_file_extractor is crashing when analyzing epub files with invalid format,
as some epub files cause libepub to segfault.

As after crashing it would retry scanning the same file, it will keep crashing
when restarted.

I am attaching a patch to resolve the issue in libepub, which allows
baloo_file_extractor to successfully scan the file.
Note that baloo_file_extractor would use more than 8 GiB of memory while
scanning some epub files, which leads to think that libepub might have some
memleaks as well.