#30758 [Opn->WFx]: no out-of-bounds check for imagecopy

From: Date: Fri, 12 Nov 2004 07:47:52 +0000
Subject: #30758 [Opn->WFx]: no out-of-bounds check for imagecopy
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-68976@lists.php.net to get a copy of this message
ID: 30758 Updated by: derick@php.net Reported By: michael at kropfberger dot com -Status: Open +Status: Wont fix Bug Type: Feature/Change Request Operating System: linux-2.6.5 PHP Version: Irrelevant New Comment: This can not be changed in PHP, but should be changed in the GD library instead. Marking as Won't fix. Previous Comments: ------------------------------------------------------------------------ [2004-11-11 11:27:28] michael at kropfberger dot com Description: ------------ when you do an imagecopy to a destinationXY which is out of range from your destination image, there is no error/warning. Fix is simple, just check imagesx and imagesy if destinationXY(+width/height) is still in range Reproduce code: --------------- $tile = imagecreate(30,30); imagecopy($tile, $origim, 999, 999, 100, 100, 50, 50); Expected result: ---------------- warning, that 999x999 is out of range for a 30x30 image Actual result: -------------- ignored, copied into oblivion ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=30758&edit=1

« previous php.bugs (#68976) next »