| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Fixes following errors:
error: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
| |
|
|
|
|
|
|
|
| |
uint16 and uint32 are now deprecated in libtiff and suggestion is to use
standard C99 types
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
|
|
|
|
| |
I removed the local MIN/MAX macros, but missed adding the gd_intern.h
include when doing so.
|
| |
|
|
|
|
|
|
| |
We do this for some funcs already, so add jpeg/png/tiff/liq/webp
stubs too. This keeps our ABI stable and lets code do runtime
detection instead.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
This is preparation for adding some linting checks for new commits from
people. Shouldn't be any functional changes here (tests still pass!).
|
|
|
|
|
|
| |
Actually, there is no need to change the alphaBlendingFlag in the first
place, if the buffer allocation fails, so we move the allocation
attempt up.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
To do so we have to add Menu.txt to the project, but we can ignore
Languages.txt and Topics.txt, at least for now.
|
|
|
|
|
| |
We add only minimal documentation comments for now, but at least that lets
Natural Docs add the function prototypes to the documentation.
|
| |
|
| |
|
|
|
|
|
| |
The ephemeral tiff_handle used when interacting with libtiff needs
to be freed.
|
|
|
|
| |
TIFFTAG_YRESOLUTION. Includes a unit test.
|
| |
|
| |
|
|
|
|
| |
that)
|
| |
|
|
|
|
| |
possible memory leak
|
|
|
|
| |
[-Wimplicit-function-declaration]
|
| |
|
| |
|
| |
|
|
|
|
| |
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
|
| |
|
| |
|
| |
|
|
|
|
| |
- nuke unused vars
|
|
|
|
| |
may behave differently)
|
| |
|
| |
|
| |
|
|
|
|
| |
is the correct way... :)
|
| |
|
|
|
|
| |
- update (c)
|
|
|
|
|
|
|
|
|
| |
- add support for 1..8bit, 24 and 32bit pixels
- replace black&white and gray support
- add default rgba import for unknown/unsupported format
- detect which mode is better to be used (save us double or triple alloc
of a complete image buffer)
- fix alpha support (extra alpha in extra planes are not supported)
|
|
|
|
| |
add comment to note that no overflow check is necessary in the colorMap* allocations
|
| |
|
|
|
|
|
| |
- add casting
- fix logic in malloc test
|
| |
|
| |
|
| |
|