From: Alan T. DeKok Date: Wed, 28 Aug 2024 19:54:33 +0000 (-0400) Subject: "out" can't be NULL X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7284639ccbbfa528eb8c824251432ccae2a12751;p=thirdparty%2Ffreeradius-server.git "out" can't be NULL --- diff --git a/src/lib/util/md5.c b/src/lib/util/md5.c index 9ec77909d25..f0fb0cd327e 100644 --- a/src/lib/util/md5.c +++ b/src/lib/util/md5.c @@ -426,10 +426,9 @@ static void fr_md5_local_final(uint8_t out[static MD5_DIGEST_LENGTH], fr_md5_ctx fr_md5_update(ctx_local, PADDING, padlen - 8); /* padlen - 8 <= 64 */ fr_md5_update(ctx_local, count, 8); - if (out != NULL) { - for (i = 0; i < 4; i++) - PUT_32BIT_LE(out + i * 4, ctx_local->state[i]); - } + for (i = 0; i < 4; i++) + PUT_32BIT_LE(out + i * 4, ctx_local->state[i]); + memset(ctx_local, 0, sizeof(*ctx_local)); /* in case it's sensitive */ }