fix possible NULL deref when built without FIDO

Analysis/fix from kircher in bz3443; ok dtucker@
This commit is contained in:
Damien Miller 2022-06-24 13:46:39 +10:00
parent f5ba85dadd
commit 7d25b37fb2

View File

@ -127,10 +127,11 @@ sshsk_open(const char *path)
ret->sk_enroll = ssh_sk_enroll;
ret->sk_sign = ssh_sk_sign;
ret->sk_load_resident_keys = ssh_sk_load_resident_keys;
return ret;
#else
error("internal security key support not enabled");
goto fail;
#endif
return ret;
}
if ((ret->dlhandle = dlopen(path, RTLD_NOW)) == NULL) {
error("Provider \"%s\" dlopen failed: %s", path, dlerror());