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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
27 - 5 = ?
Subscribe to this entry?

 
 [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: Tue Jun 11 15:01:33 2024 UTC