Created
February 18, 2012 04:36
-
-
Save kiyoto/1857431 to your computer and use it in GitHub Desktop.
openssl_decrypt bug patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: ext/openssl/openssl.c | |
=================================================================== | |
--- ext/openssl/openssl.c (revision 323312) | |
+++ ext/openssl/openssl.c (working copy) | |
@@ -4801,6 +4801,11 @@ | |
base64_str = (char*)php_base64_decode((unsigned char*)data, data_len, &base64_str_len); | |
data_len = base64_str_len; | |
data = base64_str; | |
+ | |
+ if (data == NULL) { | |
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed to decode the base64 input"); | |
+ RETURN_FALSE; | |
+ } | |
} | |
keylen = EVP_CIPHER_key_length(cipher_type); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment