summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortb <>2023-04-25 07:50:38 +0000
committertb <>2023-04-25 07:50:38 +0000
commit999d5fc7e8f933bf6a7db74cf8d001e6dacbcda9 (patch)
treead556791eb7021fa07c63d938c1dcd984455f7d6
parente2b21c7e386b1b2d4b1791d0ee826d193217dc8e (diff)
downloadopenbsd-999d5fc7e8f933bf6a7db74cf8d001e6dacbcda9.tar.gz
openbsd-999d5fc7e8f933bf6a7db74cf8d001e6dacbcda9.tar.bz2
openbsd-999d5fc7e8f933bf6a7db74cf8d001e6dacbcda9.zip
Fix allocation size
Reported by anton
-rw-r--r--src/lib/libssl/ssl_tlsext.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libssl/ssl_tlsext.c b/src/lib/libssl/ssl_tlsext.c
index f94469949c..bfceadfe96 100644
--- a/src/lib/libssl/ssl_tlsext.c
+++ b/src/lib/libssl/ssl_tlsext.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssl_tlsext.c,v 1.134 2023/04/24 16:55:06 tb Exp $ */ 1/* $OpenBSD: ssl_tlsext.c,v 1.135 2023/04/25 07:50:38 tb Exp $ */
2/* 2/*
3 * Copyright (c) 2016, 2017, 2019 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2016, 2017, 2019 Joel Sing <jsing@openbsd.org>
4 * Copyright (c) 2017 Doug Hogan <doug@openbsd.org> 4 * Copyright (c) 2017 Doug Hogan <doug@openbsd.org>
@@ -2250,7 +2250,7 @@ tlsext_randomize_build_order(SSL *s)
2250 free(s->tlsext_build_order); 2250 free(s->tlsext_build_order);
2251 s->tlsext_build_order_len = 0; 2251 s->tlsext_build_order_len = 0;
2252 2252
2253 if ((s->tlsext_build_order = calloc(s->tlsext_build_order_len, 2253 if ((s->tlsext_build_order = calloc(sizeof(*s->tlsext_build_order),
2254 N_TLS_EXTENSIONS)) == NULL) 2254 N_TLS_EXTENSIONS)) == NULL)
2255 return 0; 2255 return 0;
2256 s->tlsext_build_order_len = N_TLS_EXTENSIONS; 2256 s->tlsext_build_order_len = N_TLS_EXTENSIONS;
@@ -2299,7 +2299,7 @@ tlsext_linearize_build_order(SSL *s)
2299 free(s->tlsext_build_order); 2299 free(s->tlsext_build_order);
2300 s->tlsext_build_order_len = 0; 2300 s->tlsext_build_order_len = 0;
2301 2301
2302 if ((s->tlsext_build_order = calloc(s->tlsext_build_order_len, 2302 if ((s->tlsext_build_order = calloc(sizeof(*s->tlsext_build_order),
2303 N_TLS_EXTENSIONS)) == NULL) 2303 N_TLS_EXTENSIONS)) == NULL)
2304 return 0; 2304 return 0;
2305 s->tlsext_build_order_len = N_TLS_EXTENSIONS; 2305 s->tlsext_build_order_len = N_TLS_EXTENSIONS;