dmitry Wed Jul 11 07:27:20 2007 UTC Modified files: /php-src/ext/openssl openssl.c Log: Fixed crash on non-string passphrase and unicode support http://cvs.php.net/viewvc.cgi/php-src/ext/openssl/openssl.c?r1=1.142&r2=1.143&diff_format=u Index: php-src/ext/openssl/openssl.c diff -u php-src/ext/openssl/openssl.c:1.142 php-src/ext/openssl/openssl.c:1.143 --- php-src/ext/openssl/openssl.c:1.142 Tue Jul 10 07:57:15 2007 +++ php-src/ext/openssl/openssl.c Wed Jul 11 07:27:20 2007 @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: openssl.c,v 1.142 2007/07/10 07:57:15 dmitry Exp $ */ +/* $Id: openssl.c,v 1.143 2007/07/11 07:27:20 dmitry Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -2258,6 +2258,7 @@ } else { tmp = **zphrase; zval_copy_ctor(&tmp); + convert_to_string(&tmp); passphrase = Z_STRVAL(tmp); } @@ -2313,7 +2314,7 @@ /* passing non string values leaks, object uses toString, it returns NULL * bug38255.phpt */ - if (!(Z_TYPE_PP(val) == IS_STRING || Z_TYPE_PP(val) == IS_OBJECT)) { + if (!(Z_TYPE_PP(val) == IS_STRING || Z_TYPE_PP(val) == IS_UNICODE || Z_TYPE_PP(val) == IS_OBJECT)) { TMP_CLEAN; } convert_to_string_ex(val);
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php