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:
green 2002-01-07 15:55:20 +00:00
parent da24d835d0
commit fe27adc46b

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);