summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS3
-rw-r--r--ext/gd/gd.c1
-rw-r--r--ext/gmp/gmp.c16
-rw-r--r--win32/build/confutils.js2
4 files changed, 13 insertions, 9 deletions
diff --git a/NEWS b/NEWS
index 447a703979..04576f482c 100644
--- a/NEWS
+++ b/NEWS
@@ -14,6 +14,7 @@ PHP NEWS
- GD:
. Fixed bug #66714 ( imageconvolution breakage). (Brad Daily)
+ . Fixed #66869 (Invalid 2nd argument crashes imageaffinematrixget) (Pierre)
- Mail:
. Fixed bug #66535 (Don't add newline after X-PHP-Originating-Script) (Tjerk)
@@ -26,6 +27,8 @@ PHP NEWS
. Added function opcache_is_script_cached(). (Danack)
. Added information about interned strings usage. (Terry, Julien, Dmitry)
+- GMP
+ . Fixed bug #66872 (invalid argument crashes gmp_testbit) (Pierre)
06 Mar 2014, PHP 5.5.10
diff --git a/ext/gd/gd.c b/ext/gd/gd.c
index 0c4a0b36ff..1058eaee5c 100644
--- a/ext/gd/gd.c
+++ b/ext/gd/gd.c
@@ -5298,6 +5298,7 @@ PHP_FUNCTION(imageaffinematrixget)
double x, y;
if (Z_TYPE_P(options) != IS_ARRAY) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Array expected as options");
+ RETURN_FALSE;
}
if (zend_hash_find(HASH_OF(options), "x", sizeof("x"), (void **)&tmp) != FAILURE) {
if (Z_TYPE_PP(tmp) != IS_DOUBLE) {
diff --git a/ext/gmp/gmp.c b/ext/gmp/gmp.c
index 25e8203030..134cc4819a 100644
--- a/ext/gmp/gmp.c
+++ b/ext/gmp/gmp.c
@@ -1511,25 +1511,23 @@ ZEND_FUNCTION(gmp_clrbit)
Tests if bit is set in a */
ZEND_FUNCTION(gmp_testbit)
{
- zval **a_arg;
+ zval *a_arg;
long index;
- mpz_t *gmpnum_a;
+ mpz_ptr gmpnum_a;
+ gmp_temp_t temp_a;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Zl", &a_arg, &index) == FAILURE){
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zl", &a_arg, &index) == FAILURE){
return;
}
- ZEND_FETCH_RESOURCE(gmpnum_a, mpz_t *, a_arg, -1, GMP_RESOURCE_NAME, le_gmp);
-
if (index < 0) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Index must be greater than or equal to zero");
RETURN_FALSE;
}
- if (mpz_tstbit(*gmpnum_a, index)) {
- RETURN_TRUE;
- }
- RETURN_FALSE;
+ FETCH_GMP_ZVAL(gmpnum_a, a_arg, temp_a);
+ RETVAL_BOOL(mpz_tstbit(gmpnum_a, index));
+ FREE_GMP_TEMP(temp_a);
}
/* }}} */
diff --git a/win32/build/confutils.js b/win32/build/confutils.js
index d9a0c1b5f1..e0df4f621b 100644
--- a/win32/build/confutils.js
+++ b/win32/build/confutils.js
@@ -47,6 +47,7 @@ VC_VERSIONS[1400] = 'MSVC8 (Visual C++ 2005)';
VC_VERSIONS[1500] = 'MSVC9 (Visual C++ 2008)';
VC_VERSIONS[1600] = 'MSVC10 (Visual C++ 2010)';
VC_VERSIONS[1700] = 'MSVC11 (Visual C++ 2012)';
+VC_VERSIONS[1800] = 'MSVC12 (Visual C++ 2013)';
var VC_VERSIONS_SHORT = new Array();
VC_VERSIONS_SHORT[1200] = 'VC6';
@@ -56,6 +57,7 @@ VC_VERSIONS_SHORT[1400] = 'VC8';
VC_VERSIONS_SHORT[1500] = 'VC9';
VC_VERSIONS_SHORT[1600] = 'VC10';
VC_VERSIONS_SHORT[1700] = 'VC11';
+VC_VERSIONS_SHORT[1800] = 'VC12';
if (PROGRAM_FILES == null) {
PROGRAM_FILES = "C:\\Program Files";