fake_it:
unencrypted = bb_ask(STDIN_FILENO, timeout, prompt);
if (!unencrypted) {
- /* EOF (such as ^D) or error (such as ^C) */
+ /* EOF (such as ^D) or error (such as ^C) or timeout */
return -1;
}
encrypted = pw_encrypt(unencrypted, correct, 1);
r = (strcmp(encrypted, correct) == 0);
free(encrypted);
- memset(unencrypted, 0, strlen(unencrypted));
+ nuke_str(unencrypted);
return r;
}