tony2001 Wed Apr 18 20:36:54 2007 UTC
Modified files: (Branch: PHP_5_2)
/php-src/ext/gmp gmp.c
Log:
MFH
http://cvs.php.net/viewvc.cgi/php-src/ext/gmp/gmp.c?r1=1.49.2.2.2.8&r2=1.49.2.2.2.9&diff_format=u
Index: php-src/ext/gmp/gmp.c
diff -u php-src/ext/gmp/gmp.c:1.49.2.2.2.8 php-src/ext/gmp/gmp.c:1.49.2.2.2.9
--- php-src/ext/gmp/gmp.c:1.49.2.2.2.8 Fri Jan 12 12:32:15 2007
+++ php-src/ext/gmp/gmp.c Wed Apr 18 20:36:54 2007
@@ -1484,6 +1484,11 @@
break;
}
+ if (index < 0) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Index must be
greater than or equal to zero");
+ return;
+ }
+
if (set) {
mpz_setbit(*gmpnum_a, index);
} else {
@@ -1508,6 +1513,11 @@
convert_to_long_ex(ind_arg);
index = Z_LVAL_PP(ind_arg);
+
+ if (index < 0) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Index must be
greater than or equal to zero");
+ return;
+ }
mpz_clrbit(*gmpnum_a, index);
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php