summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authortb <>2020-09-24 19:24:45 +0000
committertb <>2020-09-24 19:24:45 +0000
commit8b60c9a777523278ddbc7a43f410248840567f0d (patch)
treeab5225ad5a847b7bbea1878f55b4d1160bdb9588 /src/lib
parent47ef143bf329e8d15f0832886a6a80d77a718cd4 (diff)
downloadopenbsd-8b60c9a777523278ddbc7a43f410248840567f0d.tar.gz
openbsd-8b60c9a777523278ddbc7a43f410248840567f0d.tar.bz2
openbsd-8b60c9a777523278ddbc7a43f410248840567f0d.zip
Push ERR_R_MALLOC_FAILURE onto the error stack
If sk_UI_STRING_new_null() fails, this must be due to a memory error, so signal this to the user. ok jsing
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libcrypto/ui/ui_lib.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libcrypto/ui/ui_lib.c b/src/lib/libcrypto/ui/ui_lib.c
index 27c7e5126f..32a56e581b 100644
--- a/src/lib/libcrypto/ui/ui_lib.c
+++ b/src/lib/libcrypto/ui/ui_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ui_lib.c,v 1.35 2020/09/24 19:22:18 tb Exp $ */ 1/* $OpenBSD: ui_lib.c,v 1.36 2020/09/24 19:24:45 tb Exp $ */
2/* Written by Richard Levitte (richard@levitte.org) for the OpenSSL 2/* Written by Richard Levitte (richard@levitte.org) for the OpenSSL
3 * project 2001. 3 * project 2001.
4 */ 4 */
@@ -130,8 +130,8 @@ static int
130allocate_string_stack(UI *ui) 130allocate_string_stack(UI *ui)
131{ 131{
132 if (ui->strings == NULL) { 132 if (ui->strings == NULL) {
133 ui->strings = sk_UI_STRING_new_null(); 133 if ((ui->strings = sk_UI_STRING_new_null()) == NULL) {
134 if (ui->strings == NULL) { 134 UIerror(ERR_R_MALLOC_FAILURE);
135 return -1; 135 return -1;
136 } 136 }
137 } 137 }