From 3f71ed844c8dfbfe4625fd0b93769a9704f6bfac Mon Sep 17 00:00:00 2001 From: tb <> Date: Sat, 7 Jun 2025 10:25:12 +0000 Subject: tls13_ctx_new(): fix calloc() incantation Switch argument order and use sizeof(*ctx) rather than sizeof(struct ...). ok jsg --- src/lib/libssl/tls13_lib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/lib/libssl/tls13_lib.c b/src/lib/libssl/tls13_lib.c index 331a3ad1a7..c3470b2931 100644 --- a/src/lib/libssl/tls13_lib.c +++ b/src/lib/libssl/tls13_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tls13_lib.c,v 1.77 2024/01/27 14:23:51 jsing Exp $ */ +/* $OpenBSD: tls13_lib.c,v 1.78 2025/06/07 10:25:12 tb Exp $ */ /* * Copyright (c) 2018, 2019 Joel Sing * Copyright (c) 2019 Bob Beck @@ -538,7 +538,7 @@ tls13_ctx_new(int mode, SSL *ssl) { struct tls13_ctx *ctx = NULL; - if ((ctx = calloc(sizeof(struct tls13_ctx), 1)) == NULL) + if ((ctx = calloc(1, sizeof(*ctx))) == NULL) goto err; ctx->hs = &ssl->s3->hs; -- cgit v1.2.3-55-g6feb