summaryrefslogtreecommitdiff
path: root/tests/test-images
Commit message (Collapse)AuthorAgeFilesLines
* gif: Fix LZW decoder accepting invalid LZW code.Robert Ancell2020-12-081-0/+0
| | | | | | | | | The code value after a reset wasn't being validated, which means we would accept invalid codes. This could cause an infinite loop in the decoder. Fixes CVE-2020-29385 Fixes https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/issues/164
* Remove the libjasper-based JPEG2000 loaderEmmanuele Bassi2020-06-262-0/+0
| | | | | | | | | | | | | | | | | Libjasper is not really maintained any more, and has been dropped by various Linux distributions over the years. GdkPixbuf has not enabled the JPEG2000 loader by default in many years, relying on downstream distributors to do so if they also shipped libjasper. This means that it's unlikely anybody has relied on GdkPixbuf to load a JPEG2000 image for the past 3 to 5 years, if at all. The only other option for loading JPEG2000 images is to use OpenJPEG, and for that there is an out of tree GdkPixbuf module available: https://notabug.org/necklace/jp2-pixbuf-loader Fixes: #152, #137
* tests: Add test image for invalid XPM dataBastien Nocera2019-03-012-0/+68
|
* tests: Add test for issue 95Bastien Nocera2019-03-011-0/+34
| | | | A laaaarge XPM file.
* tests: Add test for a PNG crasherBastien Nocera2019-02-271-0/+0
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=793470
* gif: Fix multiple LZW clear codes breaking decodingRobert Ancell2019-01-161-2/+2
| | | | | | | | | | | | | | | | The following was occurring: 1. A clear code is detected in the LZW stream 2. The first code is detected as a clear. 3. The following code is returned as a color index, this breaks if it is a clear. There were two codepaths in use, one for handling the first clear in the LZW sequence and another for handling clears within the sequence. The former handled sequential clears correctly, the latter did not. The solution is to the correct codepath and remove the other one. This simplification should not affect other decoding (as confirmed by the test suite).
* gif: Fix off by one error in LZW decoderRobert Ancell2019-01-161-2/+2
| | | | | | | | | | | | | | | | | The following was occurring: 1. Code words would be read from the LZW data blocks. 2. If there was exactly enough space for one more codeword in the block, more blocks were read. This is the off by one error. It should have read the last code before doing this. 3. If the next block was the terminating block the code would be marked as complete. 4. Another block would be attempted to be read, because the decoder was still in the same state as step 2. 5. An error was generated because the decoder was trying to read blocks after it had determined the stream had ended. This fixes the GIF decoder failing to decode images without an end-of-information code.
* tests: Add comprehensive GIF test suiteRobert Ancell2019-01-16224-0/+1335
| | | | | | | | | Add tests that exert many different types of GIF files. Some of the tests are disabled as the current gdk-pixbuf GIF implementation doesn't handle them correctly. Future commits will fix these issues and enable the tests. The test suite is generated in the PyGIF project (https://github.com/robert-ancell/pygif)
* Add test image for issue 58Emmanuele Bassi2018-05-301-0/+0
|
* tests: Add test for bug 779016Bastien Nocera2017-12-051-0/+0
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=779016
* tests: Add test for bug 778584Bastien Nocera2017-12-041-0/+0
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=778584
* tests: Add test for CVE-2017-6312Bastien Nocera2017-11-301-0/+0
| | | | | | Provided by Ariel Zelivansky <ariel.zelivans@gmail.com> https://bugzilla.gnome.org/show_bug.cgi?id=779012
* tests: Add truncated GIF file with huge dimensionsBastien Nocera2017-09-191-0/+0
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=785973
* tests: Replace non-free "lena" reference imageOlly Betts2017-09-194-0/+0
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=787050
* tests: Add test for rowstride overflowTobias Mueller2017-07-281-0/+0
| | | | | | File created using afl. https://bugzilla.gnome.org/show_bug.cgi?id=777315
* tests: Add truncated (and broken) ICO fileBastien Nocera2017-07-271-0/+0
| | | | | | The loader should return an error in that case. https://bugzilla.gnome.org/show_bug.cgi?id=778204
* tests: Add grayscale JPEG testsBastien Nocera2017-07-272-0/+0
| | | | | | | Originally from the JPEG conformance tests: http://people.sc.fsu.edu/~jburkardt/data/jpg/jpg.html https://bugzilla.gnome.org/show_bug.cgi?id=785171
* tests: Add test case for ICO quality sorting bugBastien Nocera2017-07-262-0/+0
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=785447
* tests: Add test for bug 776040Bastien Nocera2017-07-131-0/+0
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=776040
* tests: added a test case for bug 776694Tobias Mueller2017-07-131-0/+0
| | | | | afl created a file which ASan complains about: io-bmp.c:475:63: runtime error: signed integer overflow: 524672 * 4096 cannot be represented in type 'int'
* tests: Added a file for bug 780269Tobias Mueller2017-07-131-0/+0
|
* tests: Add a test image for extra large dimensions in TIFF loaderBastien Nocera2017-07-131-0/+0
| | | | | | Overflow checks were added in commit 14904cb842. https://bugzilla.gnome.org/show_bug.cgi?id=784903
* tests: Added a test case for bug 784866Tobias Mueller2017-07-131-0/+0
|
* ico: Fix uninitialised alpha valuesBastien Nocera2016-12-292-0/+0
| | | | | | | | | | As we always create a GdkPixbuf with alpha, even if the original file doesn't have an alpha channel, or a mask, make sure to set the alpha pixel value in all cases, if only to have it overridden if there is a mask present. This makes it possible to use the reference test without having differing alpha values.
* tests: Add failing test for bug 575217Bastien Nocera2016-12-281-0/+0
| | | | | | It currently errors out with "TGA image was truncated or incomplete". https://bugzilla.gnome.org/show_bug.cgi?id=575217
* tests: Add unsupported JPEG2000 fileBastien Nocera2016-12-281-0/+0
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=685543
* tests: Add test for bug 696331Bastien Nocera2016-12-282-0/+0
| | | | | | | | This compares a broken file, which might have random data inside the part of the image that was missing from the file, with our version which will have a flat colour instead. https://bugzilla.gnome.org/show_bug.cgi?id=696331
* tests: add jp2 test case to pixbuf-threadsCarlos Soriano2016-12-191-0/+0
| | | | | | | | | In case jp2 is supported, add a test to pixbuf-threads for it, since seems is the place where most of the format tests are performed. The image used as a test is the one provided by upstream libjasper. https://bugzilla.gnome.org/show_bug.cgi?id=760474
* tests: Add test for bug 766890Bastien Nocera2016-12-192-0/+0
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=766890
* tests: Add test for bug 775648Bastien Nocera2016-12-131-0/+0
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=775648
* tests: Add test for bug 775242Bastien Nocera2016-12-131-0/+0
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=775242
* tests: Add test for bug 775232Bastien Nocera2016-12-131-0/+0
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=775232
* Add a test imageMatthias Clasen2016-08-031-0/+0
|
* bmp: Detect integer overflow of the line widthTobias Mueller2016-08-021-0/+0
| | | | | | | | | | Instead of risking crashes or OOM, return an error if we detect integer overflow. The commit also includes a test image that triggers this overflow when used with pixbuf-read. https://bugzilla.gnome.org/show_bug.cgi?id=768738
* ico: Always set errorsHanno Boeck2016-08-021-0/+0
| | | | | | | | | | When the ico header turn out to be bad, always set an error when we fail. Otherwise, applications will get confused. This commit also adds an example image with a bad ico header. https://bugzilla.gnome.org/show_bug.cgi?id=768484
* bmp: Fix an integer overflow in DecodeColormapTobias Mueller2016-08-021-0/+0
| | | | | | | | | | Return an error if n_colors * samples overflows. This commit also adds a reproducer that will cause pixbuf-randomly-modified to crash in the absence of the patch. https://bugzilla.gnome.org/show_bug.cgi?id=768688
* tests: Add a bunch of TGA imagesBenjamin Otte2015-10-136-0/+0
| | | | These images are buggy, but we load them. So add them as reftests.
* tests: Add a bunch of failing TGA imagesBenjamin Otte2015-10-134-0/+0
| | | | They exploit a bunch of bugs I encountered while redoing the TGA loader.
* tests: Move back invalid images that successfully loadBenjamin Otte2015-10-133-0/+0
| | | | I have no idea if they *should* load, but they do.
* tests: Move actually valid image out of fail/ folderBenjamin Otte2015-10-131-0/+0
| | | | | Gimp and gdk-pixbuf load this image, so don't pretend in the testsuite that we can;t load it.
* tests: Move failing images into seperate directoryBenjamin Otte2015-10-1322-0/+0
|
* tests: Fix typo in MakefileBenjamin Otte2015-10-1394-0/+0
| | | | | The typo was inconsequential, because the variable was auto-expanded to its current value anyway.
* tests: Name test images properlyBenjamin Otte2015-10-1335-0/+0
| | | | | Make sure they have a sane file extension so it's easy for tools to identify them from their filename.
* tests: Remove unsupported imagesBenjamin Otte2015-10-133-0/+0
| | | | The wbmp and ras loaders were dropped, no need to keep the filrs.
* tests: Make pixbuf-slow-load test compare imagesBenjamin Otte2015-10-1350-0/+44
| | | | Compare image with a reference PNG.
* test-common: If image data differs, output first coords that failBenjamin Otte2015-10-1324-0/+0
|
* tests: Move test imagesBenjamin Otte2015-10-1338-0/+0
| | | | | | Make test-images/ a directory only containing subdirectories for ease of maintenance. Move all images from that directory to test-images/randomly-modified.
* tests: Add TGA testBenjamin Otte2015-10-1344-0/+0
| | | | | | Add a bunch of TGA files and a test that loads the image byte by byte and copies only the parts given via the area-updated signal of the loader and then checks the resulting image is correct.
* tests: Add broken animation to test suiteBastien Nocera2014-11-181-0/+1
| | | | From data_S0626.tgz in https://bugzilla.gnome.org/show_bug.cgi?id=517195
* tests: Add test from bug 519514Bastien Nocera2014-10-221-0/+747
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=519514