FAQ
First time suggesting a patch, please correct me if i do something wrong.

I was writing tests for imagecolorallocatealpha and noticed a change applied
in 5.3 is not in head, that is the validation of the first parameter,
delacred as 'r' in 5.3 and 'z' in HEAD (also in 5.2)

This is not a absolute problem since there is a resource type validation
right after looking for Image Resource. So i don't know how important this
fix is, but i wrote the patch below and it worked according to my tests.

I will also be commiting the tests in a few minutes.

PATCH:
Index: ext/gd/gd.c
===================================================================
--- ext/gd/gd.c (revision 287587)
+++ ext/gd/gd.c (working copy)
@@ -1729,7 +1729,7 @@
gdImagePtr im;
int ct = (-1);

- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zllll", &IM,
&red, &green, &blue, &alpha) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rllll", &IM,
&red, &green, &blue, &alpha) == FAILURE) {
RETURN_FALSE;
}






Cheers everyone!
--
Rafael Dohms
PHP Evangelist and Community Leader
http://www.rafaeldohms.com.br
http://www.phpsp.org.br

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupphp-internals @
categoriesphp
postedAug 24, '09 at 1:44a
activeAug 24, '09 at 1:44a
posts1
users1
websitephp.net

1 user in discussion

Rafael Dohms: 1 post

People

Translate

site design / logo © 2022 Grokbase