summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortb <>2025-06-07 10:25:12 +0000
committertb <>2025-06-07 10:25:12 +0000
commit3f71ed844c8dfbfe4625fd0b93769a9704f6bfac (patch)
tree4f241486be1e5b0c25b8fe344640f1bca3433379 /src
parent28c58763220ea6182a611f3e2236b0b1d7f36032 (diff)
downloadopenbsd-3f71ed844c8dfbfe4625fd0b93769a9704f6bfac.tar.gz
openbsd-3f71ed844c8dfbfe4625fd0b93769a9704f6bfac.tar.bz2
openbsd-3f71ed844c8dfbfe4625fd0b93769a9704f6bfac.zip
tls13_ctx_new(): fix calloc() incantation
Switch argument order and use sizeof(*ctx) rather than sizeof(struct ...). ok jsg
Diffstat (limited to 'src')
-rw-r--r--src/lib/libssl/tls13_lib.c4
1 files changed, 2 insertions, 2 deletions
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 @@
1/* $OpenBSD: tls13_lib.c,v 1.77 2024/01/27 14:23:51 jsing Exp $ */ 1/* $OpenBSD: tls13_lib.c,v 1.78 2025/06/07 10:25:12 tb Exp $ */
2/* 2/*
3 * Copyright (c) 2018, 2019 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2018, 2019 Joel Sing <jsing@openbsd.org>
4 * Copyright (c) 2019 Bob Beck <beck@openbsd.org> 4 * Copyright (c) 2019 Bob Beck <beck@openbsd.org>
@@ -538,7 +538,7 @@ tls13_ctx_new(int mode, SSL *ssl)
538{ 538{
539 struct tls13_ctx *ctx = NULL; 539 struct tls13_ctx *ctx = NULL;
540 540
541 if ((ctx = calloc(sizeof(struct tls13_ctx), 1)) == NULL) 541 if ((ctx = calloc(1, sizeof(*ctx))) == NULL)
542 goto err; 542 goto err;
543 543
544 ctx->hs = &ssl->s3->hs; 544 ctx->hs = &ssl->s3->hs;