|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-10-26 23:37 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Nov 11 16:00:01 2025 UTC |
Description: ------------ When ImageTrueColorToPalette is called with ncolors = to zero (or an uninitialized variable), it segfaults. Note: if $img is not loaded with a valid jpg, it will not crash, simply error on bad image resource. So make sure 'test.jpg' points to a valid jpeg. Reproduce code: --------------- <?php $img = imagecreatefromjpeg('test.jpg'); ImageTrueColorToPalette($img, false, 0); ?> Expected result: ---------------- No expected output, simply $img should be an indexed image. Actual result: -------------- Segmentation fault