diff options
| author | Stanislav Malyshev <stas@php.net> | 2016-10-12 23:26:15 -0700 |
|---|---|---|
| committer | Anatol Belski <ab@php.net> | 2016-10-14 01:58:48 +0200 |
| commit | 177e6adca7349bf97c3c543fd0aea577583129cb (patch) | |
| tree | 7c46a5dfa3ea1e2f626d7d607d94f8147e29bde7 | |
| parent | 94b7ab185c589c61b16a172376c386ad82ae7be7 (diff) | |
| download | php-git-177e6adca7349bf97c3c543fd0aea577583129cb.tar.gz | |
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
Fix outlen for openssl function
Syncronize with 5.6 - __toString should return ""
Fix potential overflows in php_pcre_replace_impl
(cherry picked from commit ff75665663045a96d6f182e24283e6bebb8537fa)
| -rw-r--r-- | ext/openssl/openssl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c index 1aa59ad43a..3bad717088 100644 --- a/ext/openssl/openssl.c +++ b/ext/openssl/openssl.c @@ -6342,7 +6342,7 @@ PHP_FUNCTION(openssl_decrypt) const EVP_CIPHER *cipher_type; EVP_CIPHER_CTX *cipher_ctx; struct php_openssl_cipher_mode mode; - int outlen, i = 0; + int i = 0, outlen; zend_string *outbuf; zend_string *base64_str = NULL; zend_bool free_iv = 0, free_password = 0; @@ -6377,7 +6377,7 @@ PHP_FUNCTION(openssl_decrypt) php_openssl_load_cipher_mode(&mode, cipher_type); if (!(options & OPENSSL_RAW_DATA)) { - base64_str = php_base64_decode_ex((unsigned char*)data, (int)data_len, 1); + base64_str = php_base64_decode((unsigned char*)data, data_len); if (!base64_str) { php_error_docref(NULL, E_WARNING, "Failed to base64 decode the input"); EVP_CIPHER_CTX_free(cipher_ctx); |
