diff options
Diffstat (limited to 'recipes-connectivity/openssl/openssl-qoriq/openssl-avoid-NULL-pointer-dereference-in-EVP_DigestInit_ex.patch')
-rw-r--r-- | recipes-connectivity/openssl/openssl-qoriq/openssl-avoid-NULL-pointer-dereference-in-EVP_DigestInit_ex.patch | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/recipes-connectivity/openssl/openssl-qoriq/openssl-avoid-NULL-pointer-dereference-in-EVP_DigestInit_ex.patch b/recipes-connectivity/openssl/openssl-qoriq/openssl-avoid-NULL-pointer-dereference-in-EVP_DigestInit_ex.patch index c161e62..f736e5c 100644 --- a/recipes-connectivity/openssl/openssl-qoriq/openssl-avoid-NULL-pointer-dereference-in-EVP_DigestInit_ex.patch +++ b/recipes-connectivity/openssl/openssl-qoriq/openssl-avoid-NULL-pointer-dereference-in-EVP_DigestInit_ex.patch | |||
@@ -8,14 +8,16 @@ 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 | --- | 10 | --- |
11 | --- a/crypto/evp/digest.c | 11 | Index: openssl-1.0.2h/crypto/evp/digest.c |
12 | +++ b/crypto/evp/digest.c | 12 | =================================================================== |
13 | @@ -199,7 +199,7 @@ | 13 | --- openssl-1.0.2h.orig/crypto/evp/digest.c |
14 | return 0; | 14 | +++ openssl-1.0.2h/crypto/evp/digest.c |
15 | } | 15 | @@ -211,7 +211,7 @@ int EVP_DigestInit_ex(EVP_MD_CTX *ctx, c |
16 | type = ctx->digest; | ||
17 | } | ||
16 | #endif | 18 | #endif |
17 | - if (ctx->digest != type) | 19 | - if (ctx->digest != type) { |
18 | + if (type && (ctx->digest != type)) | 20 | + if (type && (ctx->digest != type)) { |
19 | { | 21 | if (ctx->digest && ctx->digest->ctx_size) { |
20 | if (ctx->digest && ctx->digest->ctx_size) | 22 | OPENSSL_free(ctx->md_data); |
21 | OPENSSL_free(ctx->md_data); | 23 | ctx->md_data = NULL; |