mirror of
https://github.com/php/php-src.git
synced 2024-09-23 10:57:26 +00:00
Fixed bug #61124 (Crash when decoding an invalid base64 encoded string).
This commit is contained in:
parent
cde7662226
commit
6c331093b4
@ -4799,6 +4799,10 @@ PHP_FUNCTION(openssl_decrypt)
|
||||
|
||||
if (!(options & OPENSSL_RAW_DATA)) {
|
||||
base64_str = (char*)php_base64_decode((unsigned char*)data, data_len, &base64_str_len);
|
||||
if (!base64_str) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed to base64 decode the input");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
data_len = base64_str_len;
|
||||
data = base64_str;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user