summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/openssl/openssl/openssl-avoid-NULL-pointer-dereference-in-dh_pub_encode.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-connectivity/openssl/openssl/openssl-avoid-NULL-pointer-dereference-in-dh_pub_encode.patch')
-rw-r--r--meta/recipes-connectivity/openssl/openssl/openssl-avoid-NULL-pointer-dereference-in-dh_pub_encode.patch26
1 files changed, 0 insertions, 26 deletions
diff --git a/meta/recipes-connectivity/openssl/openssl/openssl-avoid-NULL-pointer-dereference-in-dh_pub_encode.patch b/meta/recipes-connectivity/openssl/openssl/openssl-avoid-NULL-pointer-dereference-in-dh_pub_encode.patch
deleted file mode 100644
index d7047bbaac..0000000000
--- a/meta/recipes-connectivity/openssl/openssl/openssl-avoid-NULL-pointer-dereference-in-dh_pub_encode.patch
+++ /dev/null
@@ -1,26 +0,0 @@
1openssl: avoid NULL pointer dereference in dh_pub_encode()/dsa_pub_encode()
2
3We should avoid accessing the pointer if ASN1_STRING_new()
4allocates memory failed.
5
6Upstream-Status: Submitted
7http://www.mail-archive.com/openssl-dev@openssl.org/msg32859.html
8
9Signed-off-by: Xufeng Zhang <xufeng.zhang@windriver.com>
10---
11Index: openssl-1.0.2/crypto/dh/dh_ameth.c
12===================================================================
13--- openssl-1.0.2.orig/crypto/dh/dh_ameth.c
14+++ openssl-1.0.2/crypto/dh/dh_ameth.c
15@@ -161,6 +161,11 @@ static int dh_pub_encode(X509_PUBKEY *pk
16 dh = pkey->pkey.dh;
17
18 str = ASN1_STRING_new();
19+ if (!str) {
20+ DHerr(DH_F_DH_PUB_ENCODE, ERR_R_MALLOC_FAILURE);
21+ goto err;
22+ }
23+
24 str->length = i2d_dhp(pkey, dh, &str->data);
25 if (str->length <= 0) {
26 DHerr(DH_F_DH_PUB_ENCODE, ERR_R_MALLOC_FAILURE);