|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2014-03-24 22:47 UTC] mwanat at forall dot pl
[2016-06-07 04:03 UTC] pajoye@php.net
[2017-01-18 18:58 UTC] cmb@php.net
-Status: Open
+Status: Duplicate
-Assigned To:
+Assigned To: cmb
[2017-01-18 18:58 UTC] cmb@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 14:00:01 2025 UTC |
Description: ------------ * ext/gd.c ---- PHP_FUNCTION(imagescale) { zval *IM; gdImagePtr im; gdImagePtr im_scaled; int new_width, new_height = -1; gdInterpolationMethod method = GD_BILINEAR_FIXED; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl|ll", &IM, &new_width, &new_height, &method) == FAILURE) { ---- On 64 bits environment ,'l'(long) have 64 bits width, int and gdInterpolationMethod type have 32 bits, so IM pointer be destroyed by value of other variables. This problem related to id:65171, I guess. - https://bugs.php.net/bug.php?id=65171 Test script: --------------- <?php $data = file_get_contents($argv[1]); $im = ImageCreateFromString($data); $im2 = imagescale($im, 256, 192, IMG_NEAREST_NEIGHBOUR); imagepng($im2, 'output.png'); Actual result: -------------- Segmentation fault