From ef3557333a96ecd2e00f7c1bc5ce56af9d12badc Mon Sep 17 00:00:00 2001 From: ENGO150 Date: Sat, 10 Dec 2022 15:39:26 +0100 Subject: [PATCH] simplified cleaning allocated returningText with memset now in decrypter --- src/core/lib/decrypter.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/core/lib/decrypter.c b/src/core/lib/decrypter.c index c3ea320..e4947d1 100644 --- a/src/core/lib/decrypter.c +++ b/src/core/lib/decrypter.c @@ -130,10 +130,7 @@ outputFlags decryptText(char *text, char *keyNew) } //FIX (CLEAN) returningText - for (int i = 0; i <= textKeyChainLength; i++) - { - returningText[i] = '\0'; - } + memset(returningText, '\0', textKeyChainLength + 1); //LOAD returningText for (int i = 0; i < textKeyChainLength; i++)