summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/openssl/openssl/openssl-avoid-NULL-pointer-dereference-in-EVP_DigestInit_ex.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-connectivity/openssl/openssl/openssl-avoid-NULL-pointer-dereference-in-EVP_DigestInit_ex.patch')
-rw-r--r--meta/recipes-connectivity/openssl/openssl/openssl-avoid-NULL-pointer-dereference-in-EVP_DigestInit_ex.patch14
1 files changed, 9 insertions, 5 deletions
diff --git a/meta/recipes-connectivity/openssl/openssl/openssl-avoid-NULL-pointer-dereference-in-EVP_DigestInit_ex.patch b/meta/recipes-connectivity/openssl/openssl/openssl-avoid-NULL-pointer-dereference-in-EVP_DigestInit_ex.patch
index 36aa442223..57e39eb673 100644
--- a/meta/recipes-connectivity/openssl/openssl/openssl-avoid-NULL-pointer-dereference-in-EVP_DigestInit_ex.patch
+++ b/meta/recipes-connectivity/openssl/openssl/openssl-avoid-NULL-pointer-dereference-in-EVP_DigestInit_ex.patch
@@ -10,15 +10,19 @@ Signed-off-by: Xufeng Zhang <xufeng.zhang@windriver.com>
10 10
11ported the patch to the 1.0.0m version 11ported the patch to the 1.0.0m version
12Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com> 2015/03/24 12Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com> 2015/03/24
13
14Ported the patch to 1.0.1t version.
15Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
13--- 16---
14--- a/crypto/evp/digest.c 17diff -ruN a/crypto/evp/digest.c b/crypto/evp/digest.c
15+++ b/crypto/evp/digest.c 18--- a/crypto/evp/digest.c 2016-05-03 15:49:00.000000000 +0200
16@@ -199,7 +199,7 @@ int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl) 19+++ b/crypto/evp/digest.c 2016-05-04 09:17:47.629259835 +0200
20@@ -199,7 +199,7 @@
17 type = ctx->digest; 21 type = ctx->digest;
18 } 22 }
19 #endif 23 #endif
20- if (ctx->digest != type) { 24- if (ctx->digest != type) {
21+ if (type && (ctx->digest != type)) { 25+ if (type && (ctx->digest != type)) {
22 if (ctx->digest && ctx->digest->ctx_size) 26 if (ctx->digest && ctx->digest->ctx_size) {
23 OPENSSL_free(ctx->md_data); 27 OPENSSL_free(ctx->md_data);
24 ctx->digest = type; 28 ctx->md_data = NULL;