Skip to content
Create a gist now

Instantly share code, notes, and snippets.

openssl_decrypt bug patch
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
Something went wrong with that request. Please try again.