use of memset and optimization

Jeffrey Altman jaltman at columbia.edu
Fri Nov 8 08:56:01 EST 2002


And ... Does optimization occur for?  I would assume not.

void i(char *buf, int len)
{
    char * key;
   
    key = (char *)malloc(64);
  
    strncpy(key, "seekrit89012345", 64);
    encrypt(buf, len, key);
    memset(key, 0, 64);
    free(key);
}


 Jeffrey Altman * Sr.Software Designer     Kermit 95 2.0 GUI available now!!!
 The Kermit Project @ Columbia University  SSH, Secure Telnet, Secure FTP, HTTP
 http://www.kermit-project.org/            Secured with MIT Kerberos, SRP, and 
 kermit-support at columbia.edu               OpenSSL.



More information about the krbdev mailing list