summaryrefslogtreecommitdiff
path: root/ext/gd
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2011-03-18 11:28:21 +0100
committerOndřej Surý <ondrej@sury.org>2011-03-18 11:28:21 +0100
commit038ba12e8724d537040e88ec794354b0c063f0a6 (patch)
treea7181b4f4d10e3a154522d4b96fdf42f4597bf2a /ext/gd
parentfd5a0b31640419ca63d1ddeaffd6d3cf2a741814 (diff)
downloadphp-038ba12e8724d537040e88ec794354b0c063f0a6.tar.gz
Imported Upstream version 5.3.6upstream/5.3.6
Diffstat (limited to 'ext/gd')
-rw-r--r--ext/gd/config.w324
-rw-r--r--ext/gd/gd.c8
-rw-r--r--ext/gd/gd_ctx.c6
-rw-r--r--ext/gd/gdcache.c5
-rw-r--r--ext/gd/php_gd.h4
5 files changed, 16 insertions, 11 deletions
diff --git a/ext/gd/config.w32 b/ext/gd/config.w32
index 9299c1b16..12fa1a32f 100644
--- a/ext/gd/config.w32
+++ b/ext/gd/config.w32
@@ -1,4 +1,4 @@
-// $Id: config.w32 300833 2010-06-28 23:26:48Z pajoye $
+// $Id: config.w32 306344 2010-12-13 18:43:10Z pajoye $
// vim:ft=javascript
ARG_WITH("gd", "Bundled GD support", "yes,shared");
@@ -66,6 +66,8 @@ if (PHP_GD != "no") {
/D USE_GD_IOCTX \
/D MSWIN32 \
");
+
+ PHP_INSTALL_HEADERS("", "ext/gd ext/gd/libgd" );
} else {
WARNING("gd not enabled; libraries and headers not found");
}
diff --git a/ext/gd/gd.c b/ext/gd/gd.c
index e20cef580..4c5faacec 100644
--- a/ext/gd/gd.c
+++ b/ext/gd/gd.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2010 The PHP Group |
+ | Copyright (c) 1997-2011 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: gd.c 306075 2010-12-08 08:45:56Z pajoye $ */
+/* $Id: gd.c 306939 2011-01-01 02:19:59Z felipe $ */
/* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
@@ -4228,8 +4228,8 @@ PHP_FUNCTION(imagepstext)
return;
}
- if (aa_steps != 4 || aa_steps != 16) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "AA steps must be 4 or 16");
+ if (aa_steps != 4 && aa_steps != 16) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Antialias steps must be 4 or 16");
RETURN_FALSE;
}
diff --git a/ext/gd/gd_ctx.c b/ext/gd/gd_ctx.c
index 7a4f5f2a9..47ad9f6e5 100644
--- a/ext/gd/gd_ctx.c
+++ b/ext/gd/gd_ctx.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2010 The PHP Group |
+ | Copyright (c) 1997-2011 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: gd_ctx.c 305507 2010-11-18 15:22:22Z pajoye $ */
+/* $Id: gd_ctx.c 306939 2011-01-01 02:19:59Z felipe $ */
#include "php_gd.h"
@@ -76,7 +76,7 @@ static void _php_image_output_ctx(INTERNAL_FUNCTION_PARAMETERS, int image_type,
* PHP_GDIMG_TYPE_WBM */
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|s!ll", &imgind, &file, &file_len, &quality, &basefilter) == FAILURE) {
return;
- }
+ }
}
ZEND_FETCH_RESOURCE(im, gdImagePtr, &imgind, -1, "Image", phpi_get_le_gd());
diff --git a/ext/gd/gdcache.c b/ext/gd/gdcache.c
index 695f289d2..fb0d6f476 100644
--- a/ext/gd/gdcache.c
+++ b/ext/gd/gdcache.c
@@ -1,5 +1,5 @@
/*
- * $Id: gdcache.c 262909 2008-07-18 01:16:25Z scottmac $
+ * $Id: gdcache.c 307588 2011-01-19 15:23:07Z pajoye $
*
* Caches of pointers to user structs in which the least-recently-used
* element is replaced in the event of a cache miss after the cache has
@@ -159,6 +159,9 @@ cacheFetch( char **error, void *key )
key_value_t *map;
map = (key_value_t *)malloc(sizeof(key_value_t));
+ if (map == NULL) {
+ return NULL;
+ }
map->key = *(int *)key;
map->value = 3;
diff --git a/ext/gd/php_gd.h b/ext/gd/php_gd.h
index 708b934e8..f33c5bdcd 100644
--- a/ext/gd/php_gd.h
+++ b/ext/gd/php_gd.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2010 The PHP Group |
+ | Copyright (c) 1997-2011 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_gd.h 293036 2010-01-03 09:23:27Z sebastian $ */
+/* $Id: php_gd.h 306939 2011-01-01 02:19:59Z felipe $ */
#ifndef PHP_GD_H
#define PHP_GD_H