Re: cvs: php4(PHP_4_3) /ext/gd gd.c
| From: | Jani Taskinen | Date: | Fri, 25 Apr 2003 08:36:47 +0000 |
| Subject: | Re: cvs: php4(PHP_4_3) /ext/gd gd.c | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-20483@lists.php.net to get a copy of this message | ||
These should also go to HEAD?
--Jani
On Fri, 25 Apr 2003, Ilia Alshanetsky wrote:
>iliaa Thu Apr 24 20:50:32 2003 EDT
>
> Modified files: (Branch: PHP_4_3)
> /php4/ext/gd gd.c
> Log:
> emalloc -> safe_emalloc
>
>
>Index: php4/ext/gd/gd.c
>diff -u php4/ext/gd/gd.c:1.221.2.25 php4/ext/gd/gd.c:1.221.2.26
>--- php4/ext/gd/gd.c:1.221.2.25 Sat Apr 19 03:45:45 2003
>+++ php4/ext/gd/gd.c Thu Apr 24 20:50:31 2003
>@@ -18,7 +18,7 @@
> +----------------------------------------------------------------------+
> */
>
>-/* $Id: gd.c,v 1.221.2.25 2003/04/19 07:45:45 moriyoshi Exp $ */
>+/* $Id: gd.c,v 1.221.2.26 2003/04/25 00:50:31 iliaa Exp $ */
>
> /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
> Cold Spring Harbor Labs. */
>@@ -692,7 +692,7 @@
> convert_to_array_ex(styles);
>
> /* copy the style values in the stylearr */
>- stylearr = emalloc(sizeof(int) * zend_hash_num_elements(HASH_OF(*styles)));
>+ stylearr = safe_emalloc(sizeof(int), zend_hash_num_elements(HASH_OF(*styles)), 0);
>
> zend_hash_internal_pointer_reset_ex(HASH_OF(*styles), &pos);
>
>@@ -2472,7 +2472,7 @@
> RETURN_FALSE;
> }
>
>- points = (gdPointPtr) emalloc(npoints * sizeof(gdPoint));
>+ points = (gdPointPtr) safe_emalloc(npoints, sizeof(gdPoint), 0);
>
> for (i = 0; i < npoints; i++) {
> if (zend_hash_index_find(Z_ARRVAL_PP(POINTS), (i * 2), (void **) &var) == SUCCESS) {
>
>
>
>
--
<- For Sale! ->