X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/putty/blobdiff_plain/b61f81bc4c102d06f13fd68e4a73ab8fdfdb3cf5..3980e64ffbb86a37d6810b004a04a21f338a408b:/cmdline.c diff --git a/cmdline.c b/cmdline.c index 2c3b7ce5..a4c91601 100644 --- a/cmdline.c +++ b/cmdline.c @@ -63,7 +63,7 @@ void cmdline_cleanup(void) int pri; if (cmdline_password) { - memset(cmdline_password, 0, strlen(cmdline_password)); + smemclr(cmdline_password, strlen(cmdline_password)); sfree(cmdline_password); cmdline_password = NULL; } @@ -106,7 +106,7 @@ int cmdline_get_passwd_input(prompts_t *p, unsigned char *in, int inlen) { return 0; prompt_set_result(p->prompts[0], cmdline_password); - memset(cmdline_password, 0, strlen(cmdline_password)); + smemclr(cmdline_password, strlen(cmdline_password)); sfree(cmdline_password); cmdline_password = NULL; tried_once = 1; @@ -368,7 +368,7 @@ int cmdline_process_param(char *p, char *value, int need_save, Conf *conf) /* Assuming that `value' is directly from argv, make a good faith * attempt to trample it, to stop it showing up in `ps' output * on Unix-like systems. Not guaranteed, of course. */ - memset(value, 0, strlen(value)); + smemclr(value, strlen(value)); } }