diff options
author | inoguchi <> | 2022-01-28 13:11:56 +0000 |
---|---|---|
committer | inoguchi <> | 2022-01-28 13:11:56 +0000 |
commit | 94f6ff99a585a3dab07a030cb9733eb20f4481c2 (patch) | |
tree | 2d83c257a2dacf7818ac19efc9333a603a7458f6 /src/lib/libssl/d1_srtp.c | |
parent | 6736a6e6f0fbc23492d5674c5a4dc31f1f0694ec (diff) | |
download | openbsd-94f6ff99a585a3dab07a030cb9733eb20f4481c2.tar.gz openbsd-94f6ff99a585a3dab07a030cb9733eb20f4481c2.tar.bz2 openbsd-94f6ff99a585a3dab07a030cb9733eb20f4481c2.zip |
Error check for sk_push in libssl
CID 24838
comment and ok tb@
Diffstat (limited to 'src/lib/libssl/d1_srtp.c')
-rw-r--r-- | src/lib/libssl/d1_srtp.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/libssl/d1_srtp.c b/src/lib/libssl/d1_srtp.c index 70f9453f5f..793fa868d7 100644 --- a/src/lib/libssl/d1_srtp.c +++ b/src/lib/libssl/d1_srtp.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: d1_srtp.c,v 1.29 2021/06/11 15:28:13 landry Exp $ */ | 1 | /* $OpenBSD: d1_srtp.c,v 1.30 2022/01/28 13:11:56 inoguchi Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -204,7 +204,10 @@ ssl_ctx_make_profiles(const char *profiles_string, | |||
204 | 204 | ||
205 | if (!srtp_find_profile_by_name(ptr, &p, | 205 | if (!srtp_find_profile_by_name(ptr, &p, |
206 | col ? col - ptr : (int)strlen(ptr))) { | 206 | col ? col - ptr : (int)strlen(ptr))) { |
207 | sk_SRTP_PROTECTION_PROFILE_push(profiles, p); | 207 | if (!sk_SRTP_PROTECTION_PROFILE_push(profiles, p)) { |
208 | sk_SRTP_PROTECTION_PROFILE_free(profiles); | ||
209 | return 1; | ||
210 | } | ||
208 | } else { | 211 | } else { |
209 | SSLerrorx(SSL_R_SRTP_UNKNOWN_PROTECTION_PROFILE); | 212 | SSLerrorx(SSL_R_SRTP_UNKNOWN_PROTECTION_PROFILE); |
210 | sk_SRTP_PROTECTION_PROFILE_free(profiles); | 213 | sk_SRTP_PROTECTION_PROFILE_free(profiles); |