com php-src: Add missing creating of md_ctx in openssl_ digest: ext/openssl/openssl.c
| From: | Jakub Zelenka | Date: | Sun, 17 Jul 2016 19:01:37 +0000 |
| Subject: | com php-src: Add missing creating of md_ctx in openssl_ digest: ext/openssl/openssl.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-93251@lists.php.net to get a copy of this message | ||
Commit: 329f74a11d4bcca59b543187be156336628b5bd6
Author: Jakub Zelenka <bukka@php.net> Sun, 17 Jul 2016 20:01:37 +0100
Parents: 444adff0b24ba3a8f292dfa7c951838fc9936a9e
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=329f74a11d4bcca59b543187be156336628b5bd6
Log:
Add missing creating of md_ctx in openssl_digest
Changed paths:
M ext/openssl/openssl.c
Diff:
diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c
index c2fe346..7d410c9 100644
--- a/ext/openssl/openssl.c
+++ b/ext/openssl/openssl.c
@@ -5816,6 +5816,7 @@ PHP_FUNCTION(openssl_digest)
siglen = EVP_MD_size(mdtype);
sigbuf = zend_string_alloc(siglen, 0);
+ md_ctx = EVP_MD_CTX_create();
if (EVP_DigestInit(md_ctx, mdtype) &&
EVP_DigestUpdate(md_ctx, (unsigned char *)data, data_len) &&
EVP_DigestFinal (md_ctx, (unsigned char *)ZSTR_VAL(sigbuf), &siglen)) {