From f1dc65bc2a4dce23be43f0b5f12b7a133eb18c94 Mon Sep 17 00:00:00 2001 From: Simon Josefsson Date: Thu, 27 Mar 2025 09:44:48 +0100 Subject: [PATCH] Fix calloc transposed arguments. --- lib/scram/client.c | 2 +- lib/scram/server.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/scram/client.c b/lib/scram/client.c index a0070051..078cba97 100644 --- a/lib/scram/client.c +++ b/lib/scram/client.c @@ -65,7 +65,7 @@ scram_start (Gsasl_session *sctx _GL_UNUSED, char buf[CNONCE_ENTROPY_BYTES]; int rc; - state = (struct scram_client_state *) calloc (sizeof (*state), 1); + state = (struct scram_client_state *) calloc (1, sizeof (*state)); if (state == NULL) return GSASL_MALLOC_ERROR; diff --git a/lib/scram/server.c b/lib/scram/server.c index e178638e..aabfa772 100644 --- a/lib/scram/server.c +++ b/lib/scram/server.c @@ -77,7 +77,7 @@ scram_start (Gsasl_session *sctx _GL_UNUSED, void **mech_data, char buf[MAX (SNONCE_ENTROPY_BYTES, DEFAULT_SALT_BYTES)]; int rc; - state = (struct scram_server_state *) calloc (sizeof (*state), 1); + state = (struct scram_server_state *) calloc (1, sizeof (*state)); if (state == NULL) return GSASL_MALLOC_ERROR; -- 2.49.0