Age | Commit message (Collapse) | Author |
|
|
|
Created with the 'scripts/runcmapdump.sh' script.
|
|
Belt and braces:
1) Don't attempt to close a NULL output stream.
2) If an output stream is NULL when we do close it, don't SEGV.
|
|
I did not foresee the case where a transparency groups color
space could be a Cal color space. I had always thought of them
as only be source color spaces not destination color spaces.
This commit makes sure that we have the equivalent ICC profile
when the destination is a Cal space.
|
|
|
|
Force the face_flags to include TRICKY if we detect a DynaLab font
name instead of trying to force hinting ourselves.
|
|
While running 'ensure_space', we can drop and retake the alloc lock.
This can enable other threads to perform store operations, which can
trigger reaps.
When reaps happen, fz_item's are discarded. This is particularly bad
when ensure_space happens to be holding onto a pointer to one (prev).
The fix, implemented here, is to move items out of the store list
(and hash table), and put them onto a local 'to_be_freed' list.
Once on this local list we can be sure that they won't be found
by other threads doing store operations, and they can be safely
freed from there (dropping/retaking the lock as required).
|
|
|
|
|
|
If Bitmap.lockPixels fails with an allocation error, scavenge in
the store.
|
|
|
|
|
|
_WIN32 is always defined on windows (it means the WinAPI is available).
_WIN64 is also defined on 64-bit targets.
This means the test for defined(_WIN32) || defined(_WIN64) is redundant,
since if _WIN64 is defined, then _WIN32 is always also defined.
MSC_VER is only defined for MSVC, so split the ifdef sections in
include/fitz/system.h into separate MSVC and WIN32 parts so that
we can build with MinGW and other non-MSVC compilers on windows.
|
|
Don't create a useless pdf_font_desc when writing font resources.
Simplify reference counting by using fewer intermediate variables.
|
|
|
|
|
|
|
|
Without this fix the stack may be resized and relocated and
then the scissor might point to stale memory.
|
|
|
|
Rather than looking at their individual scale factors, they
were looking at the global one.
|
|
|
|
When rendering dash lines with a dash pattern that starts with
a length of zero, the first dash should be of zero length. If
we are using round caps, this should actually show up!
|
|
The progress figures did not correctly add up to progress_max.
Now they do. In addition, if we abort, the progress figure
will accurately indicate how far we got.
|
|
aa.text_bits should be 0 when using the 'any' or 'center' rasterizers.
|
|
|
|
|
|
|
|
|
|
|
|
We were previously using the font's family as its name. Now if only one
of family and style are defined we use that. If both are present we
concatenate family and style with an intervening space, unless style
already has family as a prefix, in which case we just use the style.
Better would be to use the font's full name, but that is more difficult
to obtain via the freetype API.
|
|
|
|
Previously the call to fz_convert_pixmap() threw causing a destination
pixmap leak. This illustrated a bigger issue with the error handling
so now all types of pixmaps are dropped and care is taken to also end
the knockout group, should there be any.
|
|
Call these from the PDF interpreter. Make the DisplayList and
Trace devices cope.
Use these in the SVG output device.
|
|
Previously the trailing null terminator would not be written if the
formatted string ended up longer than the buffer.
|
|
|
|
|
|
|
|
fz_write_byte forgot to write the byte after needing to flush
the buffer.
|
|
SIZE_MAX is surprisingly supposed to be in stdint.h, but Android
headers for API levels < 21 accidentally put SIZE_MAX in limits.h.
Headers for API levels >= 21 correctly moved SIZE_MAX to stdint.h.
This is the situation for Android NDK r14 and earlier.
Android NDK r15 and later implement a header unification strategy:
all sets of headers for each API level are combined into a single
set of headers covering all API levels. Any differences are
expressed by #ifdeffing on __ANDROID_API__. When this was done
the moving of SIZE_MAX from limits.h to stdint.h was kept and,
importantly, no #ifdefs were used in limits.h/stdint.h concerning
SIZE_MAX. This means that the move of SIZE_MAX was retroactively
introduced for API levels < 21 in Android NDK r15 and later.
For this reason whenever mupdf uses SIZE_MAX it must include both:
* stdint.h (not just in order to follow the POSIX specification,
but also to compile successfully using Android NDK r15 and later)
* and limits.h (in order to compile successfully using Android NDK
r14 and earlier)
Hence these need to include both stdint.h and limits.h, because:
* source/fitz/memory.c uses SIZE_MAX
* source/fitz/store.c uses SIZE_MAX
The mupdf header include/mupdf/fitz/system.h includes stdint.h so
any file that includes system.h will automatically have stdint.h
This is true for both files. limits.h on the other hand needs to
be explicitly included by whomever uses SIZE_MAX. This was already
done by source/fitz/store.c but not by source/fitz/memory.c, but
has now been added.
|
|
|
|
Previously mupdf would silently ignore this situation and leave the
buffer uninitialized leading to further issues. Thanks to oss-fuzz
for reporting.
|
|
Thanks to oss-fuzz for reporting.
|
|
|
|
|
|
This is needed to simplify the way the bytes for hashing are
passed to pkcs7 functions.
|
|
For TIFF it was not just the colorspace, but other data as well.
|
|
|
|
|
|
A lot of EPUB pool allocated data is much smaller than the default size,
leading to a lot of wasted memory.
|
|
|