mirror of
https://codeberg.org/scip/pcp.git
synced 2025-12-17 20:00:58 +01:00
using secure memory where applicable using sodium_malloc or sodium_mlock, where not
This commit is contained in:
@@ -107,10 +107,15 @@ retry:
|
||||
fclose(readfrom);
|
||||
|
||||
/* Copy the password out. */
|
||||
char *p = smalloc(strlen(passbuf) + 1);
|
||||
memcpy(p, passbuf, strlen(passbuf) + 1 );
|
||||
*passwd = p;
|
||||
/*
|
||||
if ((*passwd = strdup(passbuf)) == NULL) {
|
||||
fatal(ptx, "Cannot allocate memory\n");
|
||||
goto err1;
|
||||
}
|
||||
*/
|
||||
|
||||
/* Zero any stored passwords. */
|
||||
memset(passbuf, 0, MAXPASSLEN);
|
||||
|
||||
Reference in New Issue
Block a user