diff options
author | Pierre Joye <pierre.php@gmail.com> | 2014-03-10 12:18:57 +0100 |
---|---|---|
committer | Pierre Joye <pierre.php@gmail.com> | 2014-03-10 12:18:57 +0100 |
commit | eef2978afc24c233df5c6d1260f023fa64328c88 (patch) | |
tree | 23c88f72c3cb5b93fba5740cb36e41159dd9bb68 /ext/gmp | |
parent | ba79c45174aa70597e52ff85744927c4d1108e83 (diff) | |
parent | cf7e73cf26b1b3959316ca23fbe87e45532a7297 (diff) | |
download | php-git-eef2978afc24c233df5c6d1260f023fa64328c88.tar.gz |
Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
update NEWS
fix #66872, invalid argument crashes gmp_testbit
fix #66872, invalid argument crashes gmp_testbit
add vc12 (2013)
Conflicts:
ext/gmp/gmp.c
Diffstat (limited to 'ext/gmp')
-rw-r--r-- | ext/gmp/gmp.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/gmp/gmp.c b/ext/gmp/gmp.c index 8c4eec5518..d34d78f01a 100644 --- a/ext/gmp/gmp.c +++ b/ext/gmp/gmp.c @@ -1759,6 +1759,7 @@ ZEND_FUNCTION(gmp_testbit) zval *a_arg; long index; mpz_ptr gmpnum_a; + gmp_temp_t temp_a; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zl", &a_arg, &index) == FAILURE){ return; @@ -1769,8 +1770,9 @@ ZEND_FUNCTION(gmp_testbit) RETURN_FALSE; } - gmpnum_a = GET_GMP_FROM_ZVAL(a_arg); - RETURN_BOOL(mpz_tstbit(gmpnum_a, index)); + FETCH_GMP_ZVAL(gmpnum_a, a_arg, temp_a); + RETVAL_BOOL(mpz_tstbit(gmpnum_a, index)); + FREE_GMP_TEMP(temp_a); } /* }}} */ |