From 293d7e12414f18b38985b9a1b841b1d72530b419 Mon Sep 17 00:00:00 2001 From: David Garske Date: Thu, 21 Apr 2022 13:31:09 -0700 Subject: [PATCH] Fix for report of `Use of memory after it is freed`. Force the `dataIsAlloc` set to 0. --- wolfcrypt/src/rsa.c | 1 + 1 file changed, 1 insertion(+) diff --git a/wolfcrypt/src/rsa.c b/wolfcrypt/src/rsa.c index 7866d9ed4..734d47486 100644 --- a/wolfcrypt/src/rsa.c +++ b/wolfcrypt/src/rsa.c @@ -3278,6 +3278,7 @@ static int RsaPrivateDecryptEx(const byte* in, word32 inLen, byte* out, XMEMCPY(key->data, in, inLen); } else { + key->dataIsAlloc = 0; key->data = out; } #endif