int pri;
if (cmdline_password) {
- memset(cmdline_password, 0, strlen(cmdline_password));
+ smemclr(cmdline_password, strlen(cmdline_password));
sfree(cmdline_password);
cmdline_password = NULL;
}
if (tried_once)
return 0;
- strncpy(p->prompts[0]->result, cmdline_password,
- p->prompts[0]->result_len);
- p->prompts[0]->result[p->prompts[0]->result_len-1] = '\0';
- memset(cmdline_password, 0, strlen(cmdline_password));
+ prompt_set_result(p->prompts[0], cmdline_password);
+ smemclr(cmdline_password, strlen(cmdline_password));
sfree(cmdline_password);
cmdline_password = NULL;
tried_once = 1;
return 1;
-
}
/*
/* 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));
}
}