Skip to content

Commit

Permalink
Fix #262; null pointer dereference for GetAssertion on Windows 10 (#287)
Browse files Browse the repository at this point in the history
  • Loading branch information
micolous authored Mar 1, 2023
1 parent 5356504 commit 8cbe174
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion webauthn-authenticator-rs/src/win10/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,11 @@ impl AuthenticatorBackend for Win10 {
.to_string()
.map_err(|_| WebauthnCError::Internal)?;

let mut extensions = native_to_assertion_extensions(&a.Extensions)?;
let mut extensions = if a.dwVersion >= 2 {
native_to_assertion_extensions(&a.Extensions)?
} else {
Default::default()
};
extensions.appid = Some(app_id_used.into());

Ok(PublicKeyCredential {
Expand Down

0 comments on commit 8cbe174

Please sign in to comment.