Summary: | digest signature create a wrong byterange | ||
---|---|---|---|
Product: | MuPDF | Reporter: | luoxing <luoxing> |
Component: | mupdf | Assignee: | MuPDF bugs <mupdf-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | major | ||
Priority: | P4 | ||
Version: | 1.10 | ||
Hardware: | PC | ||
OS: | Windows 10 | ||
Customer: | Word Size: | --- | |
Attachments: | code pdf,cert password(testtest) |
Description
luoxing
2017-01-09 20:03:15 UTC
1.9a is worked an the same code the reason is in function pdf_save_document() too early finalise PDF_Write_state, and too late write the file tail。 change the code in pdf_save_document() can resolve the problem. fz_try(ctx) { initialise_write_state(ctx, doc, in_opts, &opts); do_pdf_save_document(ctx, doc, &opts, in_opts); fz_drop_output(ctx, opts.out); opts.out = NULL; complete_signatures(ctx, doc, &opts, filename); } fz_always(ctx) { finalise_write_state(ctx, &opts); } fz_catch(ctx) |