diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2009-11-27 03:13:59 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2009-11-27 03:13:59 +0000 |
commit | ea3faadf6a7629bf8cbf3e3fde8fb8246afc5cb5 (patch) | |
tree | 1c11e399c61f5790f374f6582c071a7b64ed702d | |
parent | 5ef06b0c622976643db3f286029c6b43704090a5 (diff) | |
download | php-git-ea3faadf6a7629bf8cbf3e3fde8fb8246afc5cb5.tar.gz |
Revert gmp patches as they require a newer lib
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | ext/gmp/gmp.c | 10 |
2 files changed, 5 insertions, 7 deletions
@@ -3,8 +3,6 @@ PHP NEWS ?? Nov 2009, PHP 5.2.12RC2 - Updated timezone database to version 2009.19 (2009s). (Derick) -- Changed gmp_strval() to use full range from 2 to 62, and -2 to -36. FR #50283 - (David Soria Parra) - Changed "post_max_size" php.ini directive to allow unlimited post size by setting it to 0. (Rasmus) diff --git a/ext/gmp/gmp.c b/ext/gmp/gmp.c index f2eca0a476..406862ebaa 100644 --- a/ext/gmp/gmp.c +++ b/ext/gmp/gmp.c @@ -753,9 +753,9 @@ ZEND_FUNCTION(gmp_init) } if (argc == 2) { - convert_to_long_ex(base_arg); - base = Z_LVAL_PP(base_arg); - if (base < 2 || base > 62) { + convert_to_long_ex(base_arg); + base = Z_LVAL_PP(base_arg); + if (base < 2 || base > 36) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Bad base for conversion: %d (should be between 2 and 36)", base); RETURN_FALSE; } @@ -817,12 +817,12 @@ ZEND_FUNCTION(gmp_strval) break; } - if ((base < 2 && base > -2) || base > 62 || base < -36) { + if (base < 2 || base > 36) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Bad base for conversion: %d", base); RETURN_FALSE; } - num_len = mpz_sizeinbase(*gmpnum, abs(base)); + num_len = mpz_sizeinbase(*gmpnum, base); out_string = emalloc(num_len+2); if (mpz_sgn(*gmpnum) < 0) { num_len++; |