Bug 149946 - PHP GD ImageCopyMerge broken
Summary: PHP GD ImageCopyMerge broken
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: php
Version: 3.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Joe Orton
QA Contact: David Lawrence
URL: http://bugs.php.net/bug.php?id=23808
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-02-28 22:34 UTC by Samuel Stringham
Modified: 2007-11-30 22:07 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-04-28 18:53:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Patch for the PHP SPEC file (1.21 KB, patch)
2005-02-28 22:35 UTC, Samuel Stringham
no flags Details | Diff
Patch to fix the ImageCopyMerge function. (1.29 KB, patch)
2005-02-28 22:37 UTC, Samuel Stringham
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2005:405 0 high SHIPPED_LIVE Moderate: PHP security update 2005-04-28 04:00:00 UTC

Description Samuel Stringham 2005-02-28 22:34:12 UTC
Description of problem:

The PHP version that is shipped with RedHat ES3 has a bug in thi GD
imagecopymerge function, making that function unusable.  This has been
fixed upstream.  Bug information is located here:

http://bugs.php.net/bug.php?id=23808

Version-Release number of selected component (if applicable):

# rpm -q php 
php-4.3.2-19.ent

How reproducible:

100%

Steps to Reproduce:

create a file called test.php in a websites document root:

<?php
$img = ImageCreateTrueColor(100, 100);
ImageFill($img, 0, 0, ImageColorAllocate($img, 255, 255, 255));

$img2 = ImageCreateTrueColor(50, 50);
ImageFill($img2, 0, 0, ImageColorAllocate($img2, 0, 0, 0));

ImageCopyMerge($img, $img2, 0, 0, 0, 0, 50, 50, 50);

ImagePNG($img);
?>

wget this php file, rename it to test.png , then xv it.
  
Actual results:

A black box

Expected results:

A grey box

Additional info:

Patches attached.

Comment 1 Samuel Stringham 2005-02-28 22:35:48 UTC
Created attachment 111506 [details]
Patch for the PHP SPEC file

Comment 2 Samuel Stringham 2005-02-28 22:37:31 UTC
Created attachment 111507 [details]
Patch to fix the ImageCopyMerge function.

Comment 3 Joe Orton 2005-03-01 11:06:34 UTC
Thanks for the contribution, Samuel.

Comment 4 Daryl 2005-03-16 19:58:40 UTC
daryllafferty

Comment 5 Josh Bressers 2005-04-28 18:53:26 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2005-405.html



Note You need to log in before you can comment on or make changes to this bug.