diff options
| author | Pierre Joye <pajoye@php.net> | 2006-07-29 23:03:56 +0000 |
|---|---|---|
| committer | Pierre Joye <pajoye@php.net> | 2006-07-29 23:03:56 +0000 |
| commit | 3a75600dbba942caab0339da55084fd1e7de9884 (patch) | |
| tree | 6125b0d3b96049c9334b5c5cd3107cfde7a59701 /ext | |
| parent | 3fe91ed83f2bd5e95aa94014f952cc4c86d0b04e (diff) | |
| download | php-git-3a75600dbba942caab0339da55084fd1e7de9884.tar.gz | |
- MFH: make the test more obvious and add an explanation
Diffstat (limited to 'ext')
| -rw-r--r-- | ext/openssl/openssl.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c index bf22e8deac..2da9317edf 100644 --- a/ext/openssl/openssl.c +++ b/ext/openssl/openssl.c @@ -1847,8 +1847,10 @@ static EVP_PKEY * php_openssl_evp_from_zval(zval ** val, int public_key, char * return NULL; } else { /* force it to be a string and check if it refers to a file */ - if (Z_TYPE_PP(val) == IS_LONG || Z_TYPE_PP(val) == IS_BOOL - || Z_TYPE_PP(val) == IS_ARRAY) { + /* passing non string values leaks, object uses toString, it returns NULL + * See bug38255.phpt + */ + if (!(Z_TYPE_PP(val) == IS_STRING || Z_TYPE_PP(val) == IS_OBJECT)) { return NULL; } convert_to_string_ex(val); |
