summaryrefslogtreecommitdiff
path: root/tests/tiff
Commit message (Collapse)AuthorAgeFilesLines
* partial #818, fix again that logic. I need to find something more generic ↵Pierre Joye2022-02-011-4/+4
| | | | and convenient to handle errors, assert and free used resources on fail assert
* Bug/818 (#821)Pierre Joye2022-02-011-8/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Bug/818 (#820)Pierre Joye2022-02-011-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Fix tests based on coverity reports (#819)Pierre Joye2022-02-011-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* convert all files to native line encodingsMike Frysinger2018-06-214-180/+179
| | | | | | 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.
* tests: add more checks for libpng (and other deps)Mike Frysinger2017-02-232-1/+10
| | | | This fixes #382.
* Fix and reenable optimized support for reading 1 bps TIFFsChristoph M. Becker2017-01-256-2/+33
| | | | | | | | | | | | | | | 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.
* Enable libtiff support on WindowsChristoph M. Becker2017-01-253-180/+154
|
* Fix invalid read in gdImageCreateFromTiffPtr()Christoph M. Becker2016-12-137-1/+68
| | | | | | | | | | | | | | | | | 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
* tests: add missing newlines to error messagesMike Frysinger2016-07-211-3/+3
|
* Merge branch 'master' of github.com:libgd/libgdPierre Joye2016-07-172-14/+12
|\
| * No need to skip this test assertion, because libgd supports only lossless TIFFChristoph M. Becker2016-07-151-4/+2
| |
| * Partially implement #220: tests: replace all printf error messages with ↵Christoph M. Becker2016-07-152-10/+10
| | | | | | | | gdTestErrorMsg
* | win32 build fixes, skip or fix buildPierre Joye2016-07-173-0/+27
|/
* tests: cmake: switch to list appendingMike Frysinger2016-06-151-1/+1
| | | | | | 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.
* tests: cmake: move feature tests to subdirsMike Frysinger2016-06-151-0/+2
| | | | | | | | 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.
* tests: rework handling of temp output filesMike Frysinger2016-05-172-14/+6
| | | | | | | | | 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.
* tests: gd2: add general read test helpers #208Mike Frysinger2016-04-301-1/+1
| | | | | | | | | 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.
* tests: split up makefile entriesMike Frysinger2016-04-301-0/+9
| | | | | This matches what we've done with cmake files, and it makes managing the subdirs much easier.
* tests: unify cmake test code into a single macroMike Frysinger2016-04-301-6/+1
| | | | | | | | | 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.
* gitignore: split up test entriesMike Frysinger2016-04-301-0/+3
| | | | | This makes it easier to keep track of things. The single toplevel list can make it hard to notice when something is stale.
* Added support for reading and writing TIFFTAG_XRESOLUTION andMatt Bosworth2016-01-222-0/+80
| | | | TIFFTAG_YRESOLUTION. Includes a unit test.
* Upgrade to long-syntax CMAKE add_test command to improve cross-platform ↵Nathanael Jones2015-01-071-2/+1
| | | | compatibility.
* Merge outstanding autotools changesOndřej Surý2013-04-081-3/+0
|
* - apply same CS everywherepierrejoye2013-04-031-2/+2
|
* search GD headers locally at firstTakeshi Abe2013-03-012-2/+2
| | | | at least for gcc's cpp: http://gcc.gnu.org/onlinedocs/cpp/Search-Path.html
* GDTESTS_TARGET_LINK is just gdTestTakeshi Abe2013-02-221-1/+1
|
* fixed possible segfaults when gdNewDynamicCtx() returns nulltabe2009-06-253-1/+72
|
* fix for FS#204tabe2009-06-183-0/+28
* gdImageCreateFrom*() returns null if null pointer given * gdImage*() puts nothing if null pointer given