I have created that function to handle a secret
#define SIZE 100
void secret_handle(void)
{
char secret[SIZE] = {0}; //initalize the array with zeros
load_secret(secret, SIZE);
// some code to manipulate the secret
memset(secret, 0, SIZE); //clean up after using it
}
I thought that I shouldn't worry about the memset function because the array will disappear anyway from the run-time stack when the function secret_handle is quit. is there a thing I miss? Thank you all.