Fix for segfault in some comic files

This commit is contained in:
2021-06-07 09:01:06 -04:00
parent bcf3e4695b
commit ee9c98b488
2 changed files with 19 additions and 2 deletions

View File

@@ -291,6 +291,19 @@ TEST(Comic, ComicCbr) {
cleanup(&doc, &f);
}
TEST(Comic, ComicIssue160) {
vfile_t f;
document_t doc;
load_doc_file("libscan-test-files/test_files/ebook/comic-segfault-issue-160.cbr", &f, &doc);
int tn_size_saved = comic_ctx.tn_size;
comic_ctx.tn_size = 0;
parse_comic(&comic_ctx, &f, &doc);
comic_ctx.tn_size = tn_size_saved;
cleanup(&doc, &f);
}
TEST(Comic, ComicCbrAsIs) {
vfile_t f;
document_t doc;