Passing NULL as a key casues a segfault when loading SSH 1 keys. Use

an empty string instead.
This commit is contained in:
Dag-Erling Smørgrav 2012-05-26 17:03:45 +00:00
parent 89e36b6494
commit 8d6900eab8

View file

@ -112,7 +112,7 @@ pam_ssh_load_key(const char *dir, const char *kfn, const char *passphrase,
* with an empty passphrase, and if the key is not encrypted,
* accept only an empty passphrase.
*/
key = key_load_private(fn, NULL, &comment);
key = key_load_private(fn, "", &comment);
if (key != NULL && !(*passphrase == '\0' && nullok)) {
key_free(key);
return (NULL);