From fb9e036d5bbf4aad99930b92a388fe306560a7a5 Mon Sep 17 00:00:00 2001 From: Kareem Date: Thu, 6 Jul 2023 14:47:18 -0700 Subject: [PATCH] Add NULL check in TFM's fp_forcezero. --- wolfcrypt/src/tfm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wolfcrypt/src/tfm.c b/wolfcrypt/src/tfm.c index 4c1fa9aac..b4a224a05 100644 --- a/wolfcrypt/src/tfm.c +++ b/wolfcrypt/src/tfm.c @@ -4398,6 +4398,9 @@ void fp_clear(fp_int *a) void fp_forcezero (mp_int * a) { + if (a == NULL) + return; + int size; a->used = 0; a->sign = FP_ZPOS;