Commit Graph

25 Commits (master)

Author SHA1 Message Date
Christoph M. Becker 553702980a Fix #492: Potential double-free in gdImage*Ptr()
Whenever `gdImage*Ptr()` calls `gdImage*Ctx()` and the latter fails, we
must not call `gdDPExtractData()`; otherwise a double-free would
happen.  Since `gdImage*Ctx()` are void functions, and we can't change
that for BC reasons, we're introducing static helpers which are used
internally.

We're adding a regression test for `gdImageJpegPtr()`, but not for
`gdImageGifPtr()` and `gdImageWbmpPtr()` since we don't know how to
trigger failure of the respective `gdImage*Ctx()` calls.

This potential security issue has been reported by Solmaz Salimi (aka.
Rooney).
2019-01-17 11:54:55 +01:00
Mike Frysinger fd06f7f83c clean up trailing whitespace/newlines
This is preparation for adding some linting checks for new commits from
people.  Shouldn't be any functional changes here (tests still pass!).
2018-06-21 22:47:42 -04:00
Christoph M. Becker c1804def24 Mark up code examples with (start|end code)
This makes the code better readable in the sources, and we get syntax
highlighting in the generated HTML wherever we want it (i.e. not necessarily
always as with `-hl all`).
2016-08-23 22:27:27 +02:00
Christoph M. Becker 9a3bd7077e Group the supported image formats in the menu of the docs
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.
2016-08-14 16:11:05 +02:00
Christoph M. Becker b0333689ef Document all BGD_DECLARE'd functions
We add only minimal documentation comments for now, but at least that lets
Natural Docs add the function prototypes to the documentation.
2016-07-20 21:24:48 +02:00
Chris Reuter 275ac17bcc Started importing the old manual into Naturaldocs comments.
This changeset imports documention for gdImage to gdImagePng*() into
Natural Docs.  Documention is based on the text of the original
manual, version 2.0.36 but adapted to better suit the format.
Subsequent changesets will introduce docs for subsequent manual
entries.

naturaldocs, when present, is invoked by bootstrap.sh.  The completed
manual will be in docs/naturaldocs/html/index.html.  It can also be
explicitly invoked by running docs/naturaldocs/run_docs.sh.

This change also removed docs/naturaldocs/project/Menu.txt, since it
currently contains no non-generated content and is prone to introduce
noise into the changeset.
2014-01-07 15:29:06 -05:00
Takeshi Abe 8843ac583a avoid warning: implicit declaration of function ‘gd_error’ [-Wimplicit-function-declaration] 2013-04-20 08:18:20 +09:00
Ondřej Surý 32b1307c62 Use custom error handler instead of fprintf(stderr, ...) 2013-04-18 08:28:36 +02:00
pierrejoye e20413bf6b - apply same CS everywhere 2013-04-03 14:23:11 +02:00
Takeshi Abe 804e369b49 search GD headers locally at first
at least for gcc's cpp: http://gcc.gnu.org/onlinedocs/cpp/Search-Path.html
2013-03-01 16:53:11 +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
mattias da2fcc7de4 - ws + cs 2007-12-21 22:38:39 +00:00
scottmac 46fd62585e - #127, segfault when createwbmp fails 2007-10-24 13:46:56 +00:00
mattias d93586b409 - #105, gdImageCreateFrom*Ptr() can crash if gdNewDynamicCtxEx() fails 2007-08-07 19:44:40 +00:00
pierre 41825ac8b0 - sync to 2.0.29 2006-04-05 15:54:20 +00:00
pierre b77f755a64 - sync to 2.0.24 2006-04-05 15:52:22 +00:00
pierre 06e39b1bf5 - sync to 2.0.21 2006-04-05 15:50:59 +00:00
pierre 2399023b6c - sync to 2.0.9 2006-04-05 15:46:42 +00:00
pierre b0243fe7b1 - sync to 2.0.5 2006-04-05 15:44:56 +00:00
pierre b623f93e30 - sync to 2.0.4 2006-04-05 15:44:17 +00:00
pierre 1cdea7482e - sync to 2.0.1 2006-04-05 15:42:56 +00:00
pierre 22d55c5aa4 - sync to 1.8.4 2006-04-05 15:41:55 +00:00
pierre dd92c2b0df - sync to 1.8.3 2006-04-05 15:41:22 +00:00
pierre 0c29f6af63 - sync to 1.8.0 2006-04-05 15:40:28 +00:00