From e7e0457df64490e3357f3523e8c93e1de865163f Mon Sep 17 00:00:00 2001 From: Mingjie Shen Date: Wed, 23 Aug 2023 14:45:04 -0400 Subject: [PATCH] fix incorrect sizeof usage sizeof(ctx) evaluates to the size of the pointer type, which is not what we want. We should zero the struct that ctx points to. --- ph7.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ph7.c b/ph7.c index 5f7b296..6f38199 100644 --- a/ph7.c +++ b/ph7.c @@ -35215,7 +35215,7 @@ PH7_PRIVATE void MD5Final(unsigned char digest[16], MD5Context *ctx){ MD5Transform(ctx->buf, (sxu32*)ctx->in); byteReverse((unsigned char *)ctx->buf, 4); SyMemcpy(ctx->buf,digest,0x10); - SyZero(ctx,sizeof(ctx)); /* In case it's sensitive */ + SyZero(ctx,sizeof(*ctx)); /* In case it's sensitive */ } #undef F1 #undef F2