com php-src: fix allocation and copy issue: ext/standard/password.c

From: Date: Sat, 06 Oct 2012 16:33:48 +0000
Subject: com php-src: fix allocation and copy issue: ext/standard/password.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-70350@lists.php.net to get a copy of this message
Commit: 76e83f769ff5929b45cf0ac666335ce68ada166f Author: Anthony Ferrara <ircmaxell@gmail.com> Sat, 6 Oct 2012 12:33:48 -0400 Parents: 1751d5fabeff466f08da560caa6f92222ade5a82 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=76e83f769ff5929b45cf0ac666335ce68ada166f Log: fix allocation and copy issue Changed paths: M ext/standard/password.c Diff: diff --git a/ext/standard/password.c b/ext/standard/password.c index 9667fdc..70004a9 100644 --- a/ext/standard/password.c +++ b/ext/standard/password.c @@ -247,7 +247,7 @@ PHP_FUNCTION(password_needs_rehash) if (Z_TYPE_PP(option_buffer) != IS_LONG) { zval *cast_option_buffer; ALLOC_ZVAL(cast_option_buffer); - INIT_PZVAL_COPY(cast_option_buffer, *option_buffer); + MAKE_COPY_ZVAL(option_buffer, cast_option_buffer); convert_to_long(cast_option_buffer); new_cost = Z_LVAL_P(cast_option_buffer); zval_dtor(cast_option_buffer); @@ -328,7 +328,7 @@ PHP_FUNCTION(password_hash) if (Z_TYPE_PP(option_buffer) != IS_LONG) { zval *cast_option_buffer; ALLOC_ZVAL(cast_option_buffer); - INIT_PZVAL_COPY(cast_option_buffer, *option_buffer); + MAKE_COPY_ZVAL(option_buffer, cast_option_buffer); convert_to_long(cast_option_buffer); cost = Z_LVAL_P(cast_option_buffer); zval_dtor(cast_option_buffer); @@ -368,7 +368,7 @@ PHP_FUNCTION(password_hash) case IS_OBJECT: { zval *cast_option_buffer; ALLOC_ZVAL(cast_option_buffer); - INIT_PZVAL_COPY(cast_option_buffer, *option_buffer); + MAKE_COPY_ZVAL(option_buffer, cast_option_buffer); convert_to_string(cast_option_buffer); if (Z_TYPE_P(cast_option_buffer) == IS_STRING) { buffer = estrndup(Z_STRVAL_P(cast_option_buffer), Z_STRLEN_P(cast_option_buffer));

« previous php.cvs (#70350) next »