From 1bc29cdc7769c9ce6d69cbb60efbf25c96ef3917 Mon Sep 17 00:00:00 2001 From: tb <> Date: Tue, 25 Apr 2023 07:50:38 +0000 Subject: Fix allocation size Reported by anton --- src/lib/libssl/ssl_tlsext.c | 6 +++--- 1 file 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 @@ -/* $OpenBSD: ssl_tlsext.c,v 1.134 2023/04/24 16:55:06 tb Exp $ */ +/* $OpenBSD: ssl_tlsext.c,v 1.135 2023/04/25 07:50:38 tb Exp $ */ /* * Copyright (c) 2016, 2017, 2019 Joel Sing * Copyright (c) 2017 Doug Hogan @@ -2250,7 +2250,7 @@ tlsext_randomize_build_order(SSL *s) free(s->tlsext_build_order); s->tlsext_build_order_len = 0; - if ((s->tlsext_build_order = calloc(s->tlsext_build_order_len, + if ((s->tlsext_build_order = calloc(sizeof(*s->tlsext_build_order), N_TLS_EXTENSIONS)) == NULL) return 0; s->tlsext_build_order_len = N_TLS_EXTENSIONS; @@ -2299,7 +2299,7 @@ tlsext_linearize_build_order(SSL *s) free(s->tlsext_build_order); s->tlsext_build_order_len = 0; - if ((s->tlsext_build_order = calloc(s->tlsext_build_order_len, + if ((s->tlsext_build_order = calloc(sizeof(*s->tlsext_build_order), N_TLS_EXTENSIONS)) == NULL) return 0; s->tlsext_build_order_len = N_TLS_EXTENSIONS; -- cgit v1.2.3-55-g6feb