Commit Graph

2505 Commits (master)

Author SHA1 Message Date
Mike Frysinger 7b0d4198f2 configure: use m4_tolower helper
This is new in autoconf-2.69 and lets us kill off some boilerplate
in our various library tests.
2022-08-28 19:09:57 -04:00
Mike Frysinger 4bbfa00aee configure: require autoconf-2.69
This was released in 2012, and only developers really need it, so
bump the requirement.  This will let us use some newer features
that aren't available in 2.64.
2022-08-28 18:48:41 -04:00
Mike Frysinger 946088ca07 configure: add log when we check config scripts
This should make it more obvious when we aren't probing for the libs
and headers directy ourselves.

Closes #841.
2022-08-28 18:43:11 -04:00
Christoph M. Becker d4a3100ff3
Merge pull request #835 from kraj/master
Fix deprecared function prototypes
2022-08-24 12:01:33 +02:00
Khem Raj 7dae724967 Fix deprecared function prototypes
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>
2022-08-23 08:59:29 -07:00
Christoph M. Becker dbe3001a12
Merge pull request #833 from khaledhosny/fix-raqm-rotation
Fix #790, don't rotate glyph positions with Raqm 0.9.0+
2022-08-08 14:33:11 +02:00
Christoph M. Becker 0050cc8182
Fix #834: gdfonts.c comment mistake 2022-08-05 15:07:22 +02:00
Khaled Hosny 52b4da0967 Fix #790, don't rotate glyph positions with Raqm 0.9.0+
Raqm will apply the transformation matrix set on the FT_Face itself.
2022-08-01 20:55:37 +02:00
Christoph M. Becker 39e51aaaa4
Merge pull request #832 from cmb69/cmb/831
Fix #831: gdImageAvif memory leak
2022-06-17 13:13:11 +02:00
Christoph M. Becker 4b5b2f122b
Fix #831: gdImageAvif memory leak
First, we must not forget to call `avifImageDestroy()` when we're
finished with the image.

Then we also need to cater to the allocated `dataBuf`.  To keep track
of that, we "extend" `avifIO` as `avifIOCtxReader`.  To simplify, and
to avoid unnecessary allocations, we use `realloc()`.  To better fit
with GD, we also use the GD memory allocation functions instead of the
ones provided by libavif.
2022-06-10 13:58:56 +02:00
مهدي شينون (Mehdi Chinoune) 7efcf4f935
Some fixes for MINGW (#828)
* Enable webpng on MINGW

* Detect GD version using cmake language

* Use _aligned_malloc instead of posix_memalign on Windows

* Include missing "errno.h"

* Fix finding WEBP on MINGW

* Fix finding XPM on MINGW

* Use PkgConfig to find packages on MINGW

* CI: Enable more options  for MINGW
2022-04-15 15:34:24 +07:00
Mike Frysinger 03495a4f95 CI: update to newer coverity action version 2022-03-05 14:40:56 -05:00
Pierre Joye 26a5726794
Update README.md 2022-02-25 11:34:51 +07:00
Pierre Joye a023f34c75 update changelog 2022-02-07 13:03:33 +07:00
Brett 5c8d8d1159
enable interlace transform when reading png (#823) 2022-02-07 12:57:24 +07:00
Pierre Joye 09d5a6ad83 partial #818, fix again that logic. I need to find something more generic and convenient to handle errors, assert and free used resources on fail assert 2022-02-01 22:58:21 +07:00
Pierre Joye 95c6185b37
Bug/818 (#821)
* 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
2022-02-01 22:25:03 +07:00
Pierre Joye 910924ffd7
Bug/818 (#820)
* 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
2022-02-01 17:37:49 +07:00
Pierre Joye 167ea1f4f0
Fix tests based on coverity reports (#819)
* 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
2022-02-01 15:09:01 +07:00
Pierre Joye 3d760c2c21 sync Changelog 2022-01-31 11:50:09 +07:00
Pierre Joye 3f08a018cb
Fix #815, gd_topal, explicit null dereferenced (kind of false positiv… (#816)
* Fix #815, gd_topal, explicit null dereferenced (kind of false positive however it does hurt to add that check)

* Fix #815, != NULL
2022-01-31 11:46:15 +07:00
Pierre Joye ebf0fb1996
Fix #812, ensure operands priorty works as expected (#813) 2022-01-30 11:04:28 +07:00
Pierre Joye d1e2522474 Fix #808, free info. Not sure what happens, it keeps being removed on cherry-pick to 2.3.... 2022-01-30 11:00:39 +07:00
Pierre Joye cfe84e9b3b Fix #808, free info. Not sure what happens, it keeps being removed on cherry-pick to 2.3.... 2022-01-30 10:59:22 +07:00
Pierre Joye 0d50039b14 Fix #808, improve fix here, at this stage info is not null (deref earlier too) 2022-01-30 10:40:36 +07:00
Pierre Joye 767699b9f4 Fix #808, When RAQM is used, and it fails or no text processed, the glyph may be leaked 2022-01-30 09:33:07 +07:00
Pierre Joye 6cc1e39e9f
Fix #810, Wrong image freed, src_cloned should be freed if set. (#811) 2022-01-29 23:18:28 +07:00
Pierre Joye 1186f918eb
Fix #806, getPixelInterpolateWeight, getPixelOverflowTC, getPixelOver… (#807)
* Fix #806, getPixelInterpolateWeight, getPixelOverflowTC, getPixelOverflowPalette, gdImageRotate* take bgcolor as GD's truecolor, result is a TC image as well.Clean dead code.

* Not needed at this stage
2022-01-29 21:03:47 +07:00
Pierre Joye 6bbeba447b
Fix #808, When RAQM is used, and it fails or no text processed, the glyph may be leaked (#809) 2022-01-29 21:03:29 +07:00
Ziding Zhang 2f76f48837
Create SECURITY.md (#775)
A simple instruction for security researchers.
2022-01-23 13:31:55 +07:00
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
Pierre Joye 3f872fc931
#792, document gdImageEllipse (#803) 2022-01-23 11:56:41 +07:00
Pierre Joye f1a53c0821
#788 fix bug in HEIF usage, stride is require (#801)
fix bug #788 in HEIF usage, stride is require
2022-01-22 17:29:04 +07:00
Mike Frysinger 0f9dd9627a use current macOS naming style consistently 2021-10-30 13:49:21 -04:00
Mike Frysinger b614af3f6f CI: update apt databases before install
We did this in other workflows already, just not the coverity one.
2021-10-21 18:28:42 -04:00
woho 636100b928 Catch libpng warnings (#295) 2021-10-21 12:02:29 -04:00
Robert Hart ba14dec6ef
Fix out of bounds write im->alpha[im->transparent] (#785)
Since #737 gdImageColorTransparent does not correctly handle the case that im->transparent = -1
(which is the initial value and used to indicate no transparent colour has been set).

This leads to undefined behaviour via an out-of-bound write:
im->alpha[im->transparent] = gdAlphaOpaque;
(in practice I assume this merely overwrites an earlier struct member)

This can be triggered via loading a gif through gdImageCreateFromGifPtr

third_party/gd/source/gd.c:922:2: runtime error: index -1 out of bounds for type 'int [256]'
    #0 0x5629c034a839 in gdImageColorTransparent third_party/gd/source/gd.c:922:29
    #1 0x5629c034ebf0 in gdImageCreateFromGifCtx third_party/gd/source/gd_gif_in.c:328:4
    #2 0x5629c034f14f in gdImageCreateFromGifPtr third_party/gd/source/gd_gif_in.c:186:7

Fixes #784.
2021-10-09 11:40:45 -04:00
Mike Frysinger dceb29a6f5 CI: enable Coverity Scan integration 2021-10-05 08:24:39 -04:00
Remi Collet 4f88530baa fix help message 2021-10-05 00:27:16 -04:00
Mike Frysinger 712ebc445e CONTRIBUTING: fix typo in e-mail address 2021-10-05 00:21:51 -04:00
Tim Gates f7e57be725 docs: Fix a few typos
There are small typos in:
- examples/copyrotated.c
- src/gd.c
- src/gd.h
- src/gd_avif.c
- src/gd_nnquant.c
- src/gd_tga.c
- src/gd_topal.c
- src/wbmp.c
- tests/avif/compare_avif_to_png.c

Fixes:
- Should read `requires` rather than `reqiures`.
- Should read `of the` rather than `ofthe`.
- Should read `memory` rather than `memmory`.
- Should read `maximum` rather than `maxmum`.
- Should read `intersection` rather than `intertersection`.
- Should read `hypotenuse` rather than `hypothenus`.
- Should read `flexibility` rather than `flexibilty`.
- Should read `always` rather than `alwasy`.
- Should read `also` rather than `alos`.
2021-09-23 01:13:40 -04:00
Pierre Joye 826e546256 Update issue templates
Bug template
2021-09-20 10:28:19 +07:00
Pierre Joye de9b5eb943
sometimes I am stupid, let clean up src dirs for src packages install once installed and check before in case the flow failed previously before the cleanup (#774) 2021-09-16 22:55:52 +07:00
Pierre Joye 27e99a0e8f
add AOM dep for libavif (#771)
* add AOM dep for libavif

* add ninja build

* add nasm

* sudo ninja install

* we have it installed already on aws/ubuntu graviton

* we have it installed already on aws/ubuntu graviton, at the right step

* install libuv and libavif

* missing dav1d and update step names

* 20.04 does not have dav1d

* dav1d sudo ninja install

* We need shared lib for all codecs

* Enable AVIF in gd and enable deps on Graviton

* attempt to fix prefix install for dav1d and ensure it can be loaded

* ensure AOM codec is installed in /usr

* ensure YUV is installed in /usr

* AWS/Graviton has YUV already

* aom,yuv,avif has been removed from the graviton setup, installing it like on other flows. Keep same version.

* let keep AOM as it is used and installed using HEIF repo, with latest version too
2021-09-16 20:22:42 +07:00
Pierre Joye bdb133fefd
Merge pull request #769 from libgd/bug/764
Fix #764 prevent crash in test code when AVIF encode/decode fails, fix leaks in tests
2021-09-14 20:03:36 +07:00
Pierre Joye aed7181690 Fix #764 prevent crash in test code when AVIF encode/decode fails, fix memory leaks 2021-09-14 04:39:31 +07:00
Pierre Joye e89be76eba
Add notes about supported versions 2021-09-13 10:32:09 +07:00
Pierre Joye efffd21c36 Merge from 2.3 2021-09-11 23:38:22 +07:00
Pierre Joye efbf48317f add them too and enforce lf, so I don't mess it up again 2021-09-11 11:41:03 +07:00
Pierre Joye 0c2172d933 Enable these workflows for GD-* branches 2021-09-11 11:34:14 +07:00