Fix a coredump bug occurring if ssh-keygen attempts to change the password

on a DSA key.

Submitted by:	ian j hart <ianjhart@ntlworld.com>
This commit is contained in:
Brian Feldman 2002-01-07 15:55:20 +00:00
parent 0988236390
commit 27e5f9f620
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=89014

View File

@ -556,7 +556,7 @@ key_load_private(const char *filename, const char *passphrase,
lseek(fd, (off_t) 0, SEEK_SET); /* rewind */
if (pub == NULL) {
/* closes fd */
return key_load_private_pem(fd, KEY_UNSPEC, passphrase, NULL);
return key_load_private_pem(fd, KEY_UNSPEC, passphrase, commentp);
} else {
/* it's a SSH v1 key if the public key part is readable */
key_free(pub);