summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/store/str_mem.c
diff options
context:
space:
mode:
authormiod <>2014-10-28 05:46:56 +0000
committermiod <>2014-10-28 05:46:56 +0000
commit41c028be1988ad160ef2fa6feca4441bb4bca17d (patch)
treee5031b50fe250a2c5c8752bd1c08d24591108740 /src/lib/libcrypto/store/str_mem.c
parent77608e1e83f23ad41247b5fe52616f87439bb30f (diff)
downloadopenbsd-41c028be1988ad160ef2fa6feca4441bb4bca17d.tar.gz
openbsd-41c028be1988ad160ef2fa6feca4441bb4bca17d.tar.bz2
openbsd-41c028be1988ad160ef2fa6feca4441bb4bca17d.zip
Check the result of sk_*_push() operations for failure.
ok doug@ jsing@
Diffstat (limited to 'src/lib/libcrypto/store/str_mem.c')
-rw-r--r--src/lib/libcrypto/store/str_mem.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lib/libcrypto/store/str_mem.c b/src/lib/libcrypto/store/str_mem.c
index 3f32bcb8d0..a85a8946b7 100644
--- a/src/lib/libcrypto/store/str_mem.c
+++ b/src/lib/libcrypto/store/str_mem.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: str_mem.c,v 1.9 2014/07/09 16:59:33 miod Exp $ */ 1/* $OpenBSD: str_mem.c,v 1.10 2014/10/28 05:46:56 miod 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 2003. 3 * project 2003.
4 */ 4 */
@@ -250,7 +250,11 @@ mem_list_start(STORE *s, STORE_OBJECT_TYPES type, OPENSSL_ITEM attributes[],
250 goto err; 250 goto err;
251 } 251 }
252 } 252 }
253 sk_STORE_ATTR_INFO_push(context->search_attributes, attrs); 253 if (sk_STORE_ATTR_INFO_push(context->search_attributes,
254 attrs) == 0) {
255 STOREerr(STORE_F_MEM_LIST_START, ERR_R_MALLOC_FAILURE);
256 goto err;
257 }
254 } 258 }
255 if (!STORE_parse_attrs_endp(attribute_context)) 259 if (!STORE_parse_attrs_endp(attribute_context))
256 goto err; 260 goto err;