Commit Graph

26 Commits (0956816bc63acadf6208cb1010807735ad6b0597)

Author SHA1 Message Date
Pierre Joye 0956816bc6
#797 possible leak on png error, returns from setjmp lost the row_poi… (#802)
* #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)
2022-01-23 11:57:49 +07:00
wilson chen ef952d4ca5
add testcase for gdimagecreatefromgd2part 2020-02-26 23:52:52 +08:00
wilson chen b1151dedb1
tests: Correct some test depend errors 2020-01-02 20:27:29 +08:00
wilson chen 8321d47931
add testcase for gdimagecreatefromgd2partptr 2019-12-24 23:07:43 +08:00
Christoph M. Becker 2dbd8f6e66 Fix #383 (amendment)
When reading images in GD or GD2 format, we have to ensure that the
transparent color is not set, if it would refer to a non-extant palette
entry.

We back that up with respective regression tests.
2018-02-03 18:31:16 +01:00
Mike Frysinger 14b8020dda make gd/gd2 image formats optional #428
We still enable them by default, but we'll probably flip them off
in the next major release series.
2018-01-30 17:58:44 -05:00
Mike Frysinger 12a0f039b3 tests: sync feature enable lists in cmake files #382 2017-02-15 11:14:25 -05:00
Christoph M. Becker 106834014b Add regression test for issue #209
Besides the original fix, which catered to the subsequent output, the
potential DOS vulnerability due to a corrupted GD2 image file has been
fixed with c6bb583, and here we make sure that this very image is also
handled properly.
2017-01-24 00:03:02 +01:00
Christoph M. Becker 69d2fd2c59 Fix #354: Signed Integer Overflow gd_io.c
GD2 stores the number of horizontal and vertical chunks as words (i.e. 2
byte unsigned). These values are multiplied and assigned to an int when
reading the image, what can cause integer overflows. We have to avoid
that, and also make sure that either chunk count is actually greater
than zero. If illegal chunk counts are detected, we bail out from
reading the image.
2016-12-17 17:38:02 +01:00
Christoph M. Becker fe9ed49daf Fix DOS vulnerability in gdImageCreateFromGd2Ctx()
We must not pretend that there are image data if there are none. Instead
we fail reading the image file gracefully.
2016-12-13 15:33:42 +01:00
Christoph M. Becker bb1998a16e Fix #309: gdImageGd2() writes wrong chunk sizes on boundaries 2016-09-23 18:29:52 +02:00
Christoph M. Becker 09090c1256 Fix #289: Passing unrecognized formats to gdImageGd2 results in corrupted files
We must not apply the format correction twice for truecolor images.
2016-08-15 17:49:40 +02:00
Pierre Joye dd8f99a4e3 fix #255, some duplicate cases but allow png&gd2 tests 2016-07-14 13:47:07 +07:00
Pierre Joye aba3db8ba1 fix php bug 72339 (CVE-2016-5766), Integer Overflow in _gd2GetHeader() resulting in heap overflow 2016-06-28 16:23:42 +07:00
Mike Frysinger 3bb6aac422 tests: cmake: switch to list appending
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.
2016-06-15 15:02:13 -04:00
Mike Frysinger 0315e441ec tests: gd2: add general read test helpers #208
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.
2016-04-30 21:52:45 -04:00
Mike Frysinger adc8598dcb tests: unify cmake test code into a single macro
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.
2016-04-30 21:02:45 -04:00
Nathanael Jones b52b9c5579 Upgrade to long-syntax CMAKE add_test command to improve cross-platform compatibility. 2015-01-07 01:39:10 -05:00
Takeshi Abe 63da42ea82 GDTESTS_TARGET_LINK is just gdTest 2013-02-22 11:20:30 +09:00
tabe 53d6320309 fixed possible segfaults when gdNewDynamicCtx() returns null 2009-06-25 19:05:45 +00:00
tabe e27c3c7f2c fix for FS#204
* gdImageCreateFrom*() returns null if null pointer given
* gdImage*() puts nothing if null pointer given
2009-06-18 13:35:26 +00:00
tabe f8c54a6fd4 get a test executable' location from its target property. 2009-01-07 15:12:31 +00:00
tabe be219b1a8b revert to the previous revision, as EXECUTABLE_OUTPUT_PATH enabled again. 2009-01-06 15:45:49 +00:00
tabe e4c8a57338 fixed the executable paths. 2009-01-04 10:28:36 +00:00
pajoye b406d91158 - fix tests running under MinGW
- jpeg and freetpye (2.3.5) compiled under mingw seems to behaves differently.
    jpeg_read and freetype/bug00132 tests fail. I will have to investigate later
2008-04-18 14:32:10 +00:00
pajoye 9bf4f83bf3 - mv src/tests tests 2007-10-02 09:01:53 +00:00