From c634c6c8503e1aeb440e35253693be499877cc18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Kin=C4=8Dl?= Date: Wed, 3 Mar 2021 21:09:24 +0100 Subject: [PATCH] Fixed CID 577188. --- src/ssl.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ssl.c b/src/ssl.c index d54a771a1..2d68a0d4f 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -41862,8 +41862,10 @@ err: ne->object = wolfSSL_OBJ_nid2obj_ex(nid, ne->object); ne->value = wolfSSL_ASN1_STRING_type_new(type); if (ne->value != NULL) { - wolfSSL_ASN1_STRING_set(ne->value, (const void*)data, dataSz); - ne->set = 1; + if (wolfSSL_ASN1_STRING_set(ne->value, (const void*)data, + dataSz) == WOLFSSL_SUCCESS) { + ne->set = 1; + } } }