Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
|
|
Conflicts:
pdf/mupdf-internal.h
pdf/pdf_font.c
|
|
Previously this had been disabled other than in DEBUG builds under
the belief that it was only used for debugging.
|
|
|
|
|
|
Add same guard clause as used for regular fonts.
|
|
|
|
|
|
This will gracefully handle negative size entries as well, as these
would not grow the xref.
|
|
An xref stream describes objects within a range of object numbers.
Fail if either of these are negative.
|
|
If predictor, number of columns, number of colors or bits per component is
negative assume default value.
|
|
|
|
Previously a negative offset of the first object in an object stream or
a negative number of objects in an object stream would cause a huge
allocation. Detect and throw exception on negative values.
|
|
In an xref stream each entry (type, offset and generation) may
be of varible width. Warn if these are negative and assume that
they are not present.
|
|
|
|
Previously sampled pdf functions having an overflow in the number of
samples were never caught until the memory allocator was triggered.
Now there is an upper bound of 100Mbyte (the same as for
fz_read_all()).
|
|
Any pdf function with incorrect number of subfunction boundaries
will either cause an exception or have excessive boundaries be
ignored.
|
|
Any pdf functions with incorrect number of constants will have their
constant values set to default values. Any excessive constants are
ignored.
|
|
Exponential pdf functions have constraints on their input values so
warn about out of range values when loading those functions. When
evaluation the functions, assume zero without warning.
|
|
Functions that have excessive dimension sizes will have those sizes
ignored, whereas functions that have too few dimension sizes will
cause an exception.
|
|
After this pdf functions that have malformed Decode/Encode arrays with
too few/many entries compared to the number of inputs/outputs will be
handled more gracefully. Those missing mappings will be set to default
values.
|
|
Functions requiring more inputs than available input values will have
those inputs set to zero. Similarly functions producing too few
outputs will have the remaining output values be set to zero. Any
excessive input values or output values will be ignored.
|
|
Both exponential and stitching functions are limited to having one
input. Make sure that any excessive inputs are ignored.
|
|
This will allow the loading of pdf functions to validate that a pdf
function has the correct number of inputs/outputs. Additionally it
will allow for handling pdf functions with incorrect number of
inputs/outputs.
|
|
Previously a pdf function having too many inputs or outputs would
cause and exception, now they will be handled silently.
There are two places pdf functions are used: for shadings and for
colorspace tint transforms. In both cases the number of inputs/outputs
may never be more than the number of components, i.e. limited to MAXN.
Additionally the number of inputs/outputs may never be less than than
the number of components, and there is always at least one component.
|
|
BitsPerSample is already screened later in the code for invalid
values, including the default value 0 returned by pdf_to_int().
|
|
|
|
Encryption keys lengths are expressed in bits, however
one check assumed the length was expressed in bytes.
|
|
Fixes bug #692267
|
|
Fixes bug #692289
|
|
Always use BaseFont, always ignore font descriptor's FontName.
|
|
|
|
Fix bug http://code.google.com/p/sumatrapdf/issues/detail?id=1618
|
|
Fixes http://code.google.com/p/sumatrapdf/issues/detail?id=1815
|
|
Fixes bug where Symbol is not embedded but encoded as a TrueType but the
built-in font is a Type1.
http://code.google.com/p/sumatrapdf/issues/detail?id=1310
|
|
Also strip the subset prefix.
|
|
Improves text device output when using substitute fonts.
Fixes bug #693019.
|
|
Warn instead of throwing an error. Fixes file in
http://code.google.com/p/sumatrapdf/issues/detail?id=1842
|
|
Generate example data appropriate to the type of field.
|
|
room can become negative after a character has been forced into a thin text
field
|
|
Variable i can never be zero at this point. The desired point of testing
against i was to ensure that the test did not evaluate true at the
first run, and the other parts of the condition are sufficent to
ensure this, so just remove the test on i.
|
|
Since the commit to replace abs/min/max/clamp with inline versions,
"1522 - diagramm missing above 88 pc zoom.pdf" has been missing a
diagram. This is because the diagram contains sections like:
-2147483648 -2147483648 m
-2147483648 2147483647 l
2147483647 2147483647 l
2147483647 -2147483648 l
These extreme values, when transformed would give floating point values
that when naively cast down to int, flip sign (e.g. extreme positive
when cast to int becomes extreme negative).
I had been relying on the cast down giving sane results to enable me to
use fz_clampi. Revert to using fz_clamp and all is fine.
|
|
Since I implemented linearisation, any invocation that hasn't used
garbage collection has produced broken files, due to every object
being marked as freed. This was because I'd forgotten to ever set
the use_list markers to be 1. Fixed here.
|
|
|
|
Also change first argument from fz_context to pdf_document in each
of pdf_to_utf8, pdf_to_utf8_name, pdf_to_ucs2 and pdf_to_ucs2_name
|
|
|