summaryrefslogtreecommitdiff
path: root/src/lib/libssl/s3_lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libssl/s3_lib.c')
-rw-r--r--src/lib/libssl/s3_lib.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/libssl/s3_lib.c b/src/lib/libssl/s3_lib.c
index d30eb6deb7..86b32aec15 100644
--- a/src/lib/libssl/s3_lib.c
+++ b/src/lib/libssl/s3_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: s3_lib.c,v 1.256 2024/07/22 14:47:15 jsing Exp $ */ 1/* $OpenBSD: s3_lib.c,v 1.257 2024/07/23 14:40:53 jsing 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 *
@@ -1127,12 +1127,12 @@ ssl3_num_ciphers(void)
1127} 1127}
1128 1128
1129const SSL_CIPHER * 1129const SSL_CIPHER *
1130ssl3_get_cipher(unsigned int u) 1130ssl3_get_cipher_by_index(int idx)
1131{ 1131{
1132 if (u < SSL3_NUM_CIPHERS) 1132 if (idx < 0 || idx >= SSL3_NUM_CIPHERS)
1133 return (&(ssl3_ciphers[SSL3_NUM_CIPHERS - 1 - u])); 1133 return NULL;
1134 else 1134
1135 return (NULL); 1135 return &ssl3_ciphers[idx];
1136} 1136}
1137 1137
1138static int 1138static int