summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-09-13Bug 699768: Drop default colorspaces even if page transformation fails.Sebastian Rasmussen
pdf_page_transform() may throw due to a cycle in the page tree. When this happened mupdf would previously forget to drop the default colorspaces obtained, after this commit they are dropped. Thanks to oss-fuzz for reporting.
2018-09-13Make naming of effective overprint argument consistent.Sebastian Rasmussen
2018-09-13Bug 699750: Check for overprinting correctly.Sebastian Rasmussen
2018-09-12Update freetype to version 2.9.1.Sebastian Rasmussen
2018-09-12Set the profile BGR flag for non-default ICC colorspaces too.Sebastian Rasmussen
2018-09-07jni: Check exposed constants for consistency with C constants.Sebastian Rasmussen
2018-09-07jni: Remove unused flags and improve the names of some others.Sebastian Rasmussen
2018-09-07jni: Depend on fz_buffer() for default buffer size.Sebastian Rasmussen
2018-09-07jni: Make Device interface abstract.Sebastian Rasmussen
This requires subclasses of Device to implement its full interface. It also makes the compiler complain if there is a difference between the interface in Device and its subclasses. The drawback is that all Devices are required to implement all methods, but that is an easy hurdle to overcome. This change found the discrepancies between the Device, NativeDevice and TraceDevice interfaces fixed in the previous commits.
2018-09-07jni: Update TraceDevice to adhere to Device interface.Sebastian Rasmussen
Several previous updates to the Device interface required updates to TraceDevice but were forgotten.
2018-09-07jni: Improve whitespace situation in TraceDevice.Sebastian Rasmussen
2018-09-07jni: Update NativeDevice to adhere to Device interface.Sebastian Rasmussen
2018-09-07jni: Make Device interface in Java and JNI correspond to each other.Sebastian Rasmussen
2018-09-07jni: Fix typo in ColorParams.Sebastian Rasmussen
2018-09-07Bug 699743: Pop clip upon error when flushing text.Sebastian Rasmussen
Not popping causes assert to be triggered in fz_draw_end_group().
2018-09-06jni: Remove redundant public access modifier.Sebastian Rasmussen
Abstract methods in interfaces offer no implementation and are implicitly declared public, making a public access modifier redundant.
2018-09-06jni: Add interface for snapping selection to structured text.Sebastian Rasmussen
2018-09-06jni: Add StructuredTextWalker interface.Sebastian Rasmussen
2018-09-06Bug 699723: Free alternative colorspace upon error when loading ICC colorspace.Sebastian Rasmussen
2018-09-06Fix typo in size field of ICC profile colorspace.Sebastian Rasmussen
2018-09-06Bug 699717: Pop clip even in case of error.Sebastian Rasmussen
Not popping causes assert to be triggered in fz_draw_end_group().
2018-09-05Take colorspace name from ICC profile.Sebastian Rasmussen
2018-09-05Bug 699715: Support embedded ICC color profiles in GIF.Sebastian Rasmussen
2018-09-05When decoding GIF, move pixmap into struct so it can be changed.Sebastian Rasmussen
This makes it possible to change the colorspace when encountering ICC colorspaces.
2018-09-05Bug 699702: Handle ICC profiles split into multiple APP-markers.Sebastian Rasmussen
2018-09-05Add missing fz_var declarations.Tor Andersson
2018-09-05Add fz_new_stext_page_from_annot utility function.Tor Andersson
2018-09-05gl: Close password dialog when pressing Escape key.Tor Andersson
2018-09-05gl: Allow varying font sizes in text rendering.Tor Andersson
2018-09-05Use colorspace type enum instead of magic profile names.Tor Andersson
2018-09-05mutool run: Document addSimpleFont and addCJKFont functions.Tor Andersson
2018-09-05mutool run: Pass script path and arguments as scriptPath and scriptArgs.Tor Andersson
2018-09-04Fix 699177: Don't clamp line width to 1 after scaling by matrix expansion.Tor Andersson
2018-09-04Check for missing filename when saving gproof.Sebastian Rasmussen
2018-09-04Fix string handling when using gproof files.Sebastian Rasmussen
2018-09-04Add -dSAFER to gs calls in gproof.Michael Vrhel
Unlikely that this could be an issue, but lets add it for safety.
2018-09-04Fix bit rot in gproof support.Michael Vrhel
2018-08-31Visual Studio Solution tweaks.Robin Watts
Ensure that the generated libmupdf includes all library dependencies within it. This makes life easier for people linking MuPDF into their own projects as there is just one lib to include rather than a range of them that vary according to condfiguration. Fix 64bit Memento builds of libpkcs7. Remove double definitions of jpeg_get_small etc that are now shown up because of the libraries being merged into one.
2018-08-30When unrecoverable errors occur on a page, at least print them.Sebastian Rasmussen
Previously there was no visibility as to what the error was.
2018-08-30Bug 699695: Remember to end groups/softmasks even upon exception.Sebastian Rasmussen
fz_fill_path() may throw an exception halfway through pdf_show_path(), which in this case would not attempt to end any begun groups or softmasks. This led to e.g. leaks of pixmaps held by a group that was never ended. Moving the cleanup to the always block is not foolproof because the cleanup code itself may also throw exceptions, hence preventing the end of the fz_always block from being executed. This commit does put pdf_show_path() in the same situation as pdf_run_xobject() that has the same problem with its cleanup code. Thanks to oss-fuzz for reporting.
2018-08-30Bug 699694: Fix reference counting for JBIG2 globals.Sebastian Rasmussen
fz_open_jbig2d() is called at two locations in MuPDF. At one location a reference to the JBIG2 globals struct was taken before passing it to fz_open_jbig2d(). At the other location no such reference was taken, but rather ownership of the struct was implicitly transferred to fz_open_jbig2d(). This inconsistency led to a leak of the globals struct at the first location. Now, passing a JBIG2 globals struct to fz_open_jbig2d() never implictly takes ownership. Instead the JBIG2 stream will take a reference if it needs it and drops it in case of error. As usual it is the callers responsibility to drop the reference to the globals struct it owns.
2018-08-30Remove unreachable code.Sebastian Rasmussen
JBIG2 images are detected by build_compression_params() and then always passed to fz_open_image_decomp_stream() by build_filter(). Therefore there is no chance for build_filter() at a later stage to detect JBIG2 images, and so that check can be removed.
2018-08-30Remember type of exception upon error while running xobjects.Sebastian Rasmussen
2018-08-29Update to latest jbig2dec.Sebastian Rasmussen
2018-08-28Bug 699683: Skip painting too large images when using interpolation.Tor Andersson
When painting images using interpolation 16.16 fixpoint arithmetics is used. This limits the width/height of any image that can be painted to 32767. There was no size check, so large images caused overflow and subsequent out of bounds accesses which triggered MSAN. This c Thanks to oss-fuzz for reporting.
2018-08-28Bug 699675: Handle lack of default colorspaces when rendering type 3 font glyph.Sebastian Rasmussen
Previously this would result in trying to dereference a NULL pointer. Thanks to oss-fuzz for reporting.
2018-08-28Bug 699672: Handle out of bounds pointer to previous xref.Sebastian Rasmussen
Previously a value of 0 would cause the document not to be rendered.
2018-08-28Avoid use of fixed size buffers for the digest when document signingPaul Gardiner
The signer object now has an extra method that informs the caller of the maximum size the digest might be. This is used to allocate space for the digest within the file and to size some of the buffers used in the code. The openssl-based inplementation of the signer object has been updated to perform a test digest generation so as to find the size needed. We believe that the digest size is indendent of the hashed data.
2018-08-28Truncate name tokens that are too long.Tor Andersson
2018-08-23Honour the read-only form-field flag.Paul Gardiner
Avoid pdf_pass_event interacting with widgets that have the read-only field set.