diff options
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.patch | 19 |
1 files changed, 11 insertions, 8 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 c161e62f62..36aa442223 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 | |||
@@ -7,15 +7,18 @@ Upstream-Status: Submitted | |||
7 | http://www.mail-archive.com/openssl-dev@openssl.org/msg32860.html | 7 | http://www.mail-archive.com/openssl-dev@openssl.org/msg32860.html |
8 | 8 | ||
9 | Signed-off-by: Xufeng Zhang <xufeng.zhang@windriver.com> | 9 | Signed-off-by: Xufeng Zhang <xufeng.zhang@windriver.com> |
10 | |||
11 | ported the patch to the 1.0.0m version | ||
12 | Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com> 2015/03/24 | ||
10 | --- | 13 | --- |
11 | --- a/crypto/evp/digest.c | 14 | --- a/crypto/evp/digest.c |
12 | +++ b/crypto/evp/digest.c | 15 | +++ b/crypto/evp/digest.c |
13 | @@ -199,7 +199,7 @@ | 16 | @@ -199,7 +199,7 @@ int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl) |
14 | return 0; | 17 | type = ctx->digest; |
15 | } | 18 | } |
16 | #endif | 19 | #endif |
17 | - if (ctx->digest != type) | 20 | - if (ctx->digest != type) { |
18 | + if (type && (ctx->digest != type)) | 21 | + if (type && (ctx->digest != type)) { |
19 | { | 22 | if (ctx->digest && ctx->digest->ctx_size) |
20 | if (ctx->digest && ctx->digest->ctx_size) | 23 | OPENSSL_free(ctx->md_data); |
21 | OPENSSL_free(ctx->md_data); | 24 | ctx->digest = type; |