* #797 possible leak on png error, returns from setjmp lost the row_pointers ref somehow
* skip that one using mingw until we have a reliable portable FP related tests suites (may never happpen)
Git ident attributes were in most cases utilized with SVN and keywords
substitutions, where $Id$ were replaced with certain revision from the
repository. In Git this functionality is different. Each $Id$ needs to
be defined in .gitattributes file to be effective. This patch removes
unused and outdated attributes.
If the png error handle is triggered during output, the allocated
rows aren't freed. Change the allocation to calloc to zero out all
the rows, and then walk them in the jump callback to release them.
The issue is that `gdImagePngCtxEx` (which is called by `gdImagePngPtr`
and the other PNG output functions to do the real work) does not return
whether it succeeded or failed, so this is not checked in
`gdImagePngPtr` and the function wrongly assumes everything is okay,
which is not, in this case, because the palette image contains no
palette entries.
We can't change the signature of `gdImagePngCtxEx` for API
compatibility reasons, so we introduce the static helper
`_gdImagePngCtxEx` which returns success respective failure, so
`gdImagePngPtr` and `gdImagePngPtrEx` can check the return value. We
leave it solely to libpng for now to report warnings regarding the
failing write.
CVE-2017-6362
libgd clients need to be able to distinguish between fatal and
"extremely fatal" libjpeg and libpng errors, because in the former case
execution can proceed, but in the latter case libgd calls exit().
Therefore we report fatal errors as GD_WARNING.
This makes the code better readable in the sources, and we get syntax
highlighting in the generated HTML wherever we want it (i.e. not necessarily
always as with `-hl all`).
The use of setjmp in this function was slightly incorrect: we store
pointers to allocated memory in stack variables, but we didn't call
setjmp again afterwards. Optimization might place those in registers
which would clobber their values on the next longjmp. Make sure we
call setjmp after every allocation to update the state.
As part of the cleanup, unify all the error code paths so we don't
have to worry about every if statement being fully correct.
This changeset imports documention for gdImage to gdImagePng*() into
Natural Docs. Documention is based on the text of the original
manual, version 2.0.36 but adapted to better suit the format.
Subsequent changesets will introduce docs for subsequent manual
entries.
naturaldocs, when present, is invoked by bootstrap.sh. The completed
manual will be in docs/naturaldocs/html/index.html. It can also be
explicitly invoked by running docs/naturaldocs/run_docs.sh.
This change also removed docs/naturaldocs/project/Menu.txt, since it
currently contains no non-generated content and is prone to introduce
noise into the changeset.