mainreplay: fix leak in decrypt_aes_128() (#1737)
In decrypt_aes_128() at src/apps/replay/mainreplay.c, it calls base64decode() to allocates memory in encryptedText, but forgets to free encryptedText in the end of this function. Add free() after finished using encryptedText. Signed-off-by: Lidong Yan <502024330056@smail.nju.edu.cn>
This commit is contained in:
parent
04a8e52e09
commit
439914716d
@ -1841,6 +1841,7 @@ void decrypt_aes_128(char *in, const unsigned char *mykey) {
|
||||
CRYPTO_ctr128_encrypt(encryptedText, outdata, newTotalSize, &key, state.ivec, state.ecount, &state.num,
|
||||
(block128_f)AES_encrypt);
|
||||
|
||||
free(encryptedText);
|
||||
strcat(last, (char *)outdata);
|
||||
printf("%s\n", last);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user