Age | Commit message (Collapse) | Author |
|
When running under Windows, replace fopen with our own fopen_utf8
that converts from utf8 to unicode before calling the unicode
version of fopen.
|
|
If a PDF xref subsection is broken in the wrong place, we can get
NULL back from fz_strsep, which causes a SEGV when fed to atoi.
Add a new fz_atoi that copes with NULL to avoid this.
Problem found in a test file, 3959.pdf.SIGSEGV.ad4.3289 supplied
by Mateusz "j00ru" Jurczyk and Gynvael Coldwind of the Google
Security Team using Address Sanitizer. Many thanks!
|
|
Instead of using macros for min/max/abs/clamp, we move to using
inline functions. These are more typesafe, and should produce
equivalent code on compilers that support inline (i.e. pretty much
everything we care about these days).
People can always do their own macro versions if they prefer.
|
|
|
|
|
|
Instead of returning in 1.0 for underflow/overflow, return minimum
value for underflow and maximum value for overflow. NaN returns 1.0.
|
|
Add some function documentation to fitz.h.
Add fz_ prefix to runetochar, chartorune, runelen etc. Change
fz_runetochar to avoid passing unnecessary pointer.
|
|
|
|
Attempt to separate public API from internal functions.
|
|
Also: use 'cannot' instead of 'failed to' in error messages.
|
|
Bug 692245 gives a file that produces a runtime assert in mupdf due to an
extremely large ctm offset (unrepresentable in a float). We fix our code
here so that such floats are always read as 1.0.
In this particular case, the exact value read doesn't seem to matter. We
match acrobat. We pick 1.0 rather than 0.0 as this is less likely to
provoke division by 0 errors later on.
|
|
The run-together words are dead! Long live the underscores!
The postscript inspired naming convention of using all run-together
words has served us well, but it is now time for more readable code.
In this commit I have also added the sed script, rename.sed, that I used
to convert the source. Use it on your patches and application code.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static.
|
|
the errors immediately.
|