mirror of
https://github.com/php/php-src.git
synced 2025-08-18 15:08:55 +02:00
Merge branch 'PHP-7.0' into PHP-7.1
This commit is contained in:
commit
c30e5a32c1
3 changed files with 21 additions and 1 deletions
3
NEWS
3
NEWS
|
@ -546,7 +546,8 @@ PHP NEWS
|
||||||
(Pierre)
|
(Pierre)
|
||||||
. Fixed bug #72482 (Ilegal write/read access caused by gdImageAALine
|
. Fixed bug #72482 (Ilegal write/read access caused by gdImageAALine
|
||||||
overflow). (Pierre)
|
overflow). (Pierre)
|
||||||
. Fixed bug #72494 (imagecropauto out-of-bounds access). (Pierre)
|
. Fixed bug #72494 (imagecropauto out-of-bounds access). (Fernando, Pierre,
|
||||||
|
cmb)
|
||||||
|
|
||||||
- Intl:
|
- Intl:
|
||||||
. Partially fixed #72506 (idn_to_ascii for UTS #46 incorrect for long domain
|
. Partially fixed #72506 (idn_to_ascii for UTS #46 incorrect for long domain
|
||||||
|
|
|
@ -243,6 +243,10 @@ gdImagePtr gdImageCropThreshold(gdImagePtr im, const unsigned int color, const f
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!gdImageTrueColor(im) && color >= gdImageColorsTotal(im)) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
/* TODO: Add gdImageGetRowPtr and works with ptr at the row level
|
/* TODO: Add gdImageGetRowPtr and works with ptr at the row level
|
||||||
* for the true color and palette images
|
* for the true color and palette images
|
||||||
* new formats will simply work with ptr
|
* new formats will simply work with ptr
|
||||||
|
|
15
ext/gd/tests/bug72494.phpt
Normal file
15
ext/gd/tests/bug72494.phpt
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
--TEST--
|
||||||
|
Bug #72494 (imagecropauto out-of-bounds access)
|
||||||
|
--SKIPIF--
|
||||||
|
<?php
|
||||||
|
if (!extension_loaded('gd')) die('skip gd extension not available');
|
||||||
|
?>
|
||||||
|
--FILE--
|
||||||
|
<?php
|
||||||
|
$im = imagecreate(10,10);
|
||||||
|
imagecropauto($im, IMG_CROP_THRESHOLD, 0, 1337);
|
||||||
|
?>
|
||||||
|
===DONE===
|
||||||
|
--EXPECTF--
|
||||||
|
Warning: imagecropauto(): Color argument missing with threshold mode in %s on line %d
|
||||||
|
===DONE===
|
Loading…
Add table
Add a link
Reference in a new issue