diff options
author | Kinichiro Inoguchi <inoguchi@cvs.openbsd.org> | 2022-01-28 13:11:57 +0000 |
---|---|---|
committer | Kinichiro Inoguchi <inoguchi@cvs.openbsd.org> | 2022-01-28 13:11:57 +0000 |
commit | fd7b28e70b71a8c0d94acc50ab849c29dc33017b (patch) | |
tree | de093aaf15f88469a24109602259997eff93baf3 /lib | |
parent | 31add6b3965b98628881f5b828c161cfdeb2a942 (diff) |
Error check for sk_push in libssl
CID 24838
comment and ok tb@
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libssl/d1_srtp.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/libssl/d1_srtp.c b/lib/libssl/d1_srtp.c index 70f9453f5f8..793fa868d77 100644 --- a/lib/libssl/d1_srtp.c +++ b/lib/libssl/d1_srtp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: d1_srtp.c,v 1.29 2021/06/11 15:28:13 landry Exp $ */ +/* $OpenBSD: d1_srtp.c,v 1.30 2022/01/28 13:11:56 inoguchi Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -204,7 +204,10 @@ ssl_ctx_make_profiles(const char *profiles_string, if (!srtp_find_profile_by_name(ptr, &p, col ? col - ptr : (int)strlen(ptr))) { - sk_SRTP_PROTECTION_PROFILE_push(profiles, p); + if (!sk_SRTP_PROTECTION_PROFILE_push(profiles, p)) { + sk_SRTP_PROTECTION_PROFILE_free(profiles); + return 1; + } } else { SSLerrorx(SSL_R_SRTP_UNKNOWN_PROTECTION_PROFILE); sk_SRTP_PROTECTION_PROFILE_free(profiles); |