php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #30758 no out-of-bounds check for imagecopy
Submitted: 2004-11-11 11:27 UTC Modified: 2004-11-12 08:47 UTC
From: michael at kropfberger dot com Assigned:
Status: Wont fix Package: Feature/Change Request
PHP Version: Irrelevant OS: linux-2.6.5
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2004-11-11 11:27 UTC] 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 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-11-12 08:47 UTC] derick@php.net
This can not be changed in PHP, but should be changed in the GD library instead. Marking as Won't fix.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 17 00:01:34 2024 UTC