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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: michael at kropfberger dot com
New email:
PHP Version: OS:

 

 [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: Thu May 16 09:01:32 2024 UTC