summaryrefslogtreecommitdiff
path: root/ext/gd/libgd/gd_interpolation.c
Commit message (Collapse)AuthorAgeFilesLines
* Define floorf if system doesn't have it (follow up for 22c48761)Lior Kaplan2017-11-291-0/+10
| | | | floorf is checked in config.m4
* Fixed bug #65148 (imagerotate may alter image dimensions)Christoph M. Becker2017-10-241-22/+65
| | | | | | | | | We apply the respective patches from external libgd, work around the still missing `gdImageClone()`, and fix the special cased rotation routines according to Pierre's patch (https://gist.github.com/pierrejoye/59d72385ed1888cf8894a7ed437235ae). We also cater to bug73272.phpt whose result obviously changes a bit.
* Fixed bug #75139 (libgd/gd_interpolation.c:1786: suspicious if ?)Christoph M. Becker2017-09-021-2/+2
| | | | | | | | We back-port https://github.com/libgd/libgd/commit/dd48286 even though we cannot come up with a regression test, because the erroneous condition appears to be impossible to trigger. We also parenthesize the inner ternary operation to avoid confusion.
* Fix #73279: Integer overflow in gdImageScaleBilinearPalette()Christoph M. Becker2016-10-101-4/+4
| | | | | | | The color components are supposed to be in range 0..255, so we must not cast them to `signed char`, what can be the default for `char`. Port of <https://github.com/libgd/libgd/commit/77c8d359>.
* Fix #68712: suspicious if-else statementsChristoph M. Becker2016-07-231-28/+8
|
* Fix copy&paste errors in gd_interpolation.cChristoph M. Becker2016-07-231-4/+4
| | | | According to <https://github.com/libgd/libgd/commit/f101380>.
* improve fix #72558, free contribRow as wellPierre Joye2016-07-191-0/+1
|
* improve fix #72558, while (u>=0) with unsigned int will always be truePierre Joye2016-07-191-3/+4
|
* Merge branch 'PHP-5.5' into PHP-5.6Stanislav Malyshev2016-07-191-0/+1
|\ | | | | | | | | * PHP-5.5: Fix memory leak
| * Fix memory leakStanislav Malyshev2016-07-191-0/+1
| |
* | Merge branch 'PHP-5.5' into PHP-5.6Stanislav Malyshev2016-07-191-47/+69
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * PHP-5.5: fix #72519, possible OOB using imagegif fix #72512, invalid read or write for palette image when invalid transparent index is used Apparently some envs miss SIZE_MAX Fix tests Fix bug #72618: NULL Pointer Dereference in exif_process_user_comment Partial fix for bug #72613 - do not treat negative returns from bz2 as size_t Fix bug #72606: heap-buffer-overflow (write) simplestring_addn simplestring.c Fix for bug #72558, Integer overflow error within _gdContributionsAlloc() Fix bug #72603: Out of bound read in exif_process_IFD_in_MAKERNOTE Fix bug #72562 - destroy var_hash properly Fix bug #72533 (locale_accept_from_http out-of-bounds access) Fix fir bug #72520 Fix for bug #72513 CS fix and comments with bug ID Fix for HTTP_PROXY issue. add tests for bug #72512 Fixed bug #72512 gdImageTrueColorToPaletteBody allows arbitrary write/read access Fixed bug #72479 - same as #72434 Conflicts: ext/bz2/bz2.c main/SAPI.c main/php_variables.c
| * fix #72512, invalid read or write for palette image when invalid transparent ↵Pierre Joye2016-07-191-1/+7
| | | | | | | | | | | | | | index is used Conflicts: ext/gd/libgd/gd.c
| * Fix for bug #72558, Integer overflow error within _gdContributionsAlloc()Stanislav Malyshev2016-07-181-47/+69
| |
* | Merge branch 'PHP-5.5' into PHP-5.6Pierre Joye2016-07-191-1/+7
|\ \ | | | | | | | | | | | | * PHP-5.5: fix #72512, invalid read or write for palette image when invalid transparent index is used
| * | fix #72512, invalid read or write for palette image when invalid transparent ↵Pierre Joye2016-07-191-1/+7
| |/ | | | | | | index is used
* | Merge branch 'PHP-5.5' into PHP-5.6.23Stanislav Malyshev2016-06-211-0/+3
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * PHP-5.5: Fixed bug #72446 - Integer Overflow in gdImagePaletteToTrueColor() resulting in heap overflow update NEWS fix tests fix build Fix bug #72455: Heap Overflow due to integer overflows Fix bug #72434: ZipArchive class Use After Free Vulnerability in PHP's GC algorithm and unserialize Fixed ##72433: Use After Free Vulnerability in PHP's GC algorithm and unserialize Fix bug #72407: NULL Pointer Dereference at _gdScaleVert Fix bug #72402: _php_mb_regex_ereg_replace_exec - double free Fix bug #72298 pass2_no_dither out-of-bounds access Fixed #72339 Integer Overflow in _gd2GetHeader() resulting in heap overflow Fix bug #72262 - do not overflow int Fix bug #72400 and #72403 - prevent signed int overflows for string lengths Fix bug #72275: don't allow smart_str to overflow int Fix bug #72340: Double Free Courruption in wddx_deserialize update NEWS Fix #66387: Stack overflow with imagefilltoborder Skip test which is 64bits only 5.5.37 now Conflicts: configure.in ext/mcrypt/mcrypt.c ext/spl/spl_directory.c main/php_version.h
| * Fix bug #72407: NULL Pointer Dereference at _gdScaleVertStanislav Malyshev2016-06-181-0/+3
| |
* | #72337 invalid dimensions can lead to segvPierre Joye2016-06-071-1/+33
| |
* | Merge branch 'PHP-5.5' into PHP-5.6.22Stanislav Malyshev2016-05-241-9/+9
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * PHP-5.5: Fix memory leak in imagescale() Update NEWS Better fix for bug #72135 Fixed bug #72227: imagescale out-of-bounds read Fix bug #72241: get_icu_value_internal out-of-bounds read Fix bug #72135 - don't create strings with lengths outside int range Add check for string overflow to all string add operations Fix bug #72114 - int/size_t confusion in fread Updated NEWS Fixed bug #71331 - Uninitialized pointer in phar_make_dirstream() Conflicts: Zend/zend_operators.c ext/phar/dirstream.c ext/phar/tests/bug71331.phpt
| * Fix memory leak in imagescale()Stanislav Malyshev2016-05-241-3/+3
| |
| * Fixed bug #72227: imagescale out-of-bounds readStanislav Malyshev2016-05-231-8/+8
| | | | | | | | Ported from https://github.com/libgd/libgd/commit/4f65a3e4eedaffa1efcf9ee1eb08f0b504fbc31a
| * fix the fix for bug #70976 (imagerotate)Remi Collet2016-01-121-2/+2
| |
* | fix the fix for bug #70976 (imagerotate)Remi Collet2016-01-121-2/+2
| |
* | Merge branch 'PHP-5.5' into PHP-5.6Stanislav Malyshev2016-01-051-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | * PHP-5.5: Update NEWS Improve fix for bug #70976 Fixed bug #70661 (Use After Free Vulnerability in WDDX Packet Deserialization) Fixed bug #70741: Session WDDX Packet Deserialization Type Confusion Vulnerability Fixed #70728 Fixed bug #70755: fpm_log.c memory leak and buffer overflow Fix bug #70976: fix boundary check on gdImageRotateInterpolated typofix
| * Improve fix for bug #70976Stanislav Malyshev2015-12-281-1/+1
| |
| * Fix bug #70976: fix boundary check on gdImageRotateInterpolatedStanislav Malyshev2015-12-071-1/+1
| |
* | Fix #66882: imagerotate by -90 degrees truncates image by 1pxChristoph M. Becker2015-07-131-2/+5
| | | | | | | | | | | | | | | | | | Contrary to the external libgd, the bundled libgd doesn't use optimized rotation algorithms for negative square angles. We fix that now. There are other improvements in gdImageRotateInterpolated() in the external libgd. I'll leave them out for now, in the hope that we'll be able to rejoin the two libraries rather soon.
* | Fix #70064: imagescale(..., IMG_BICUBIC) leaks memoryChristoph M. Becker2015-07-131-2/+2
| | | | | | | | | | A temporary image (tmp_im) is created with gdImageTrueColor() and freed with gdFree() instead of gdImageDestroy(). Let's fix that.
* | Fix #69024: imagescale segfault with palette based imageChristoph M. Becker2015-07-131-0/+5
| | | | | | | | | | | | | | | | imagescale(..., IMG_BICUBIC) is not supposed to work with palette images, so we fix that by converting to true color if necessary. Basically the same fix has already been applied to the external libgd[1]. [1] <https://github.com/libgd/libgd/commit/723ea520bed3b5854df87393c687323d3930edf3>
* | Merge branch 'PHP-5.5' into PHP-5.6Remi Collet2014-03-121-6/+6
|\ \ | |/ | | | | | | | | * PHP-5.5: NEWS Fix bug #66887 imagescale - poor quality of scaled image
| * Fix bug #66887 imagescale - poor quality of scaled imageRemi Collet2014-03-121-6/+6
| | | | | | | | | | | | | | Issue with signed char overflow. Upstream fix: https://bitbucket.org/libgd/gd-libgd/commits/4b86e06937bc5ff116be969137f8da9d1a7869d5
* | Merge branch 'PHP-5.5' into PHP-5.6Remi Collet2014-03-121-4/+1
|\ \ | |/ | | | | | | * PHP-5.5: Fixed Bug #66893i imagescale ignore method argument
| * Fixed Bug #66893i imagescale ignore method argumentRemi Collet2014-03-121-4/+1
| | | | | | | | | | | | | | We also have our goto fail; bug. Upstream fix for libgd https://bitbucket.org/libgd/gd-libgd/commits/5b42b1178c37ffd30c9a15733058656be0277da0
* | Merge branch 'PHP-5.5'unknown2013-09-091-1/+4
|\ \ | |/ | | | | | | * PHP-5.5: ensure that the defined interpolation method is used by the generic scaling functions
| * ensure that the defined interpolation method is used by the generic scaling ↵unknown2013-09-091-1/+4
| | | | | | | | functions
* | Merge branch 'PHP-5.5'Pierre Joye2013-06-201-29/+12
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * PHP-5.5: fix #65070, bgcolor does not use the same format as the input image with imagerotate fix #65070, bgcolor does not use the same format as the input image with imagerotate Fix the spelling of the php_cli_server_http_response_status_code_pair typedef. Change the search in get_status_string() to correctly handle unknown codes. Update git rules (5.5 is stable, 5.3 sec only) skip test for bug #64936 when tokenizer not built Bump version Update credits Merge NEWS from PHP 5.4 branch Reorder NEWS for PHP 5.5.0 final Conflicts: configure.in ext/gd/libgd/gd_interpolation.c main/php_version.h
| * fix #65070, bgcolor does not use the same format as the input image with ↵Pierre Joye2013-06-201-28/+11
| | | | | | | | imagerotate
* | Merge branch 'PHP-5.5'Remi Collet2013-06-031-8/+8
|\ \ | |/ | | | | | | * PHP-5.5: Fixed Bug #64962 imagerotate produce corrupted image
| * Fixed Bug #64962 imagerotate produce corrupted imageRemi Collet2013-06-031-8/+8
| | | | | | | | | | | | See https://bitbucket.org/libgd/gd-libgd/issue/67/problem-with-gdrotate This computation need to be done in signed range.
* | Merge branch 'PHP-5.5'Pierre Joye2013-05-271-6/+6
|\ \ | |/ | | | | | | * PHP-5.5: fix #64898imagerotate is broken with bilinear interpolation
| * fix #64898imagerotate is broken with bilinear interpolationPierre Joye2013-05-271-6/+6
| |
* | Merge branch 'PHP-5.5'Pierre Joye2013-04-301-1/+1
|\ \ | |/ | | | | | | * PHP-5.5: fix #64738, fix implicit type declaration
| * fix #64738, fix implicit type declarationPierre Joye2013-04-301-1/+1
| |
* | Merge branch 'PHP-5.5'Pierre Joye2013-04-091-21/+20
|\ \ | |/ | | | | | | * PHP-5.5: ws and comment for recommended aa method
| * ws and comment for recommended aa methodPierre Joye2013-04-091-21/+31
| |
* | Merge branch 'PHP-5.5'Pierre Joye2013-04-091-10/+11
|\ \ | |/ | | | | | | * PHP-5.5: fix some unitialized values and typo
| * fix some unitialized values and typoPierre Joye2013-04-091-10/+11
| |
* | merging conflict left overPierre Joye2013-03-261-1/+0
| |
* | conflictPierre Joye2013-03-261-0/+4
|\ \ | |/
| * fix regression, take #2 (merge issue due to git 1.8 default setting changes)Pierre Joye2013-03-261-0/+4
| |