com php-src: fix build: ext/gmp/gmp.c

From: Date: Wed, 27 Apr 2016 06:04:29 +0000
Subject: com php-src: fix build: ext/gmp/gmp.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-91854@lists.php.net to get a copy of this message
Commit: a32e143d4eb185f9b666ef1cd93761b2baafec28 Author: Stanislav Malyshev <stas@php.net> Tue, 26 Apr 2016 23:04:29 -0700 Parents: ccc12efa32f855e6057cb9b7e1e45afe08503a00 Branches: PHP-7.0 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=a32e143d4eb185f9b666ef1cd93761b2baafec28 Log: fix build Changed paths: M ext/gmp/gmp.c Diff: diff --git a/ext/gmp/gmp.c b/ext/gmp/gmp.c index 928ec26..a1e1589 100644 --- a/ext/gmp/gmp.c +++ b/ext/gmp/gmp.c @@ -1145,7 +1145,7 @@ ZEND_FUNCTION(gmp_export) size_t bits_per_word = size * 8; size_t count = (mpz_sizeinbase(gmpnumber, 2) + bits_per_word - 1) / bits_per_word; - zend_string *out_string = zend_string_safe_alloc(count, out_len, 0, 0); + zend_string *out_string = zend_string_safe_alloc(count, size, 0, 0); mpz_export(ZSTR_VAL(out_string), NULL, order, size, endian, 0, gmpnumber); ZSTR_VAL(out_string)[ZSTR_LEN(out_string)] = '\0';

« previous php.cvs (#91854) next »