cvs: php4 /ext/gmp gmp.c

From: Date: Tue, 05 Dec 2000 14:17:39 +0000
Subject: cvs: php4 /ext/gmp gmp.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-2952@lists.php.net to get a copy of this message
stas Tue Dec 5 06:17:39 2000 EDT Modified files: /php4/ext/gmp gmp.c Log: Add check for conversion base Index: php4/ext/gmp/gmp.c diff -u php4/ext/gmp/gmp.c:1.3 php4/ext/gmp/gmp.c:1.4 --- php4/ext/gmp/gmp.c:1.3 Fri Dec 1 07:25:22 2000 +++ php4/ext/gmp/gmp.c Tue Dec 5 06:17:38 2000 @@ -440,6 +440,11 @@ break; } + if(base < 2 || base > 36) { + zend_error(E_WARNING, "Bad base for conversion: %d", base); + RETURN_FALSE; + } + num_len = mpz_sizeinbase(*gmpnum, base); out_string = emalloc(num_len+2); if(mpz_sgn(*gmpnum) < 0) {

« previous php.cvs (#2952) next »