| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
and convenient to handle errors, assert and free used resources on fail assert
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Partial #818, unused arg
* Partial #818, init var
* partail #818, fix va_args usage
* partail #818, handle f* calls and avoid possible call to malloc with negative values
* partail #818, prevent double free
* partail #818, resource leak if test fail
* partail #818, null deref fix
* partail #818, avoid double free on fp failure
* Partial #818, fix error msg
* Partial #818, leak on error
* Partial #818, null deref
* Partial #818, avoid possible negative index on failure
* partial #818, does not free if we return if requested new size overflow
* partial #818, avoid double free, free where the alloc happened
* partial #818, fix assert logic and test exp_size for <=0
* partial #818, fix assert logic for color idx test
* partial #818, new case for possible leak, improve logic
* partial #818, fix assert logic for color idx test
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Partial #818, unused arg
* Partial #818, init var
* partail #818, fix va_args usage
* partail #818, handle f* calls and avoid possible call to malloc with negative values
* partail #818, prevent double free
* partail #818, resource leak if test fail
* partail #818, null deref fix
* partail #818, avoid double free on fp failure
* Partial #818, fix error msg
* Partial #818, leak on error
* Partial #818, null deref
* Partial #818, avoid possible negative index on failure
* partial #818, does not free if we return if requested new size overflow
* partial #818, avoid double free, free where the alloc happened
* partial #818, fix assert logic and test exp_size for <=0
* partial #818, fix assert logic for color idx test
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Partial #818, unused arg
* Partial #818, init var
* partail #818, fix va_args usage
* partail #818, handle f* calls and avoid possible call to malloc with negative values
* partail #818, prevent double free
* partail #818, resource leak if test fail
* partail #818, null deref fix
* partail #818, avoid double free on fp failure
* Partial #818, fix error msg
* Partial #818, leak on error
* Partial #818, null deref
* Partial #818, avoid possible negative index on failure
* partial #818, does not free if we return if requested new size overflow
* partial #818, avoid double free, free where the alloc happened
|
|
|
|
|
|
| |
A bunch of these files were committed with Windows line encodings.
Strip all those ^M gremlins out as people working on Windows can
use git's autocrlf setting to convert back and forth as needed.
|
|
|
|
| |
This fixes #382.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Due to #82 the optimized support for reading 1 bps TIFF files (black &
white) had been disabled. Tony Lew already pointed out a fix in #88.
Furthermore, there was the following missing and improper error handling:
* TIFFReadScanline() returns -1 on error, not 0
* the result of TIFFReadTile() hasn't been checked
* in case of failure of these functions, the error had not been
propagated
We fix this, and re-enable direct support for 1 bps TIFFs, which is
more memory efficient than the general RGBA support. We also make sure
not to hit any not yet implemented code path.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
tiff_invalid_read.tiff is corrupt, and causes an invalid read in
gdImageCreateFromTiffPtr(), but not in gdImageCreateFromTiff(). The culprit
is dynamicGetbuf(), which doesn't check for out-of-bound reads. In this case,
dynamicGetbuf() is called with a negative dp->pos, but also positive buffer
overflows have to be handled, in which case 0 has to be returned (cf. commit
75e29a9).
Fixing dynamicGetbuf() exhibits that the corrupt TIFF would still create
the image, because the return value of TIFFReadRGBAImage() is not checked.
We do that, and let createFromTiffRgba() fail if TIFFReadRGBAImage() fails.
This issue had been reported by Ibrahim El-Sayed to security@libgd.org.
CVE-2016-6911
|
| |
|
|\ |
|
| | |
|
| |
| |
| |
| | |
gdTestErrorMsg
|
|/ |
|
|
|
|
|
|
| |
This makes it a bit cleaner when dealing with optional tests as we
use the LIST(APPEND...) command everywhere instead of sometimes SET
and sometimes LIST.
|
|
|
|
|
|
|
|
| |
This makes it better match the autotools which makes it easier to
compare, and allows finer grain checks (since some subtests need
more than one feature test).
As an example, this makes it clear we were missing gdinterpolatedscale.
|
|
|
|
|
|
|
|
|
| |
Many of the tests open files in local paths for writing which leaves a
variety of temp files in the tests subdirs. This ends up failing in a
few scenarios like out of tree builds or cmake builds.
Add a few helper functions to the common gdtest module to quickly get
handles to temp files for the tests to leverage.
|
|
|
|
|
|
|
|
|
| |
Since we have random files we want to read & check, turn the two
read programs into general tools. Then we have shell scripts to
run against the right inputs.
Most of the changes here are just shuffling variable names so we
can add to check_PROGRAMS independently of TESTS.
|
|
|
|
|
| |
This matches what we've done with cmake files, and it makes managing
the subdirs much easier.
|
|
|
|
|
|
|
|
|
| |
This makes the test code a lot easier to manage rather than copying &
pasting the same boiler plate multiple times.
Also take the opportunity to add a common prefix to each test name so
we don't get collisions between subdirs if a test happens to use the
same exact name.
|
|
|
|
|
| |
This makes it easier to keep track of things. The single toplevel list
can make it hard to notice when something is stale.
|
|
|
|
| |
TIFFTAG_YRESOLUTION. Includes a unit test.
|
|
|
|
| |
compatibility.
|
| |
|
| |
|
|
|
|
| |
at least for gcc's cpp: http://gcc.gnu.org/onlinedocs/cpp/Search-Path.html
|
| |
|
| |
|
|
* gdImageCreateFrom*() returns null if null pointer given
* gdImage*() puts nothing if null pointer given
|