Skip to content

Commit

Permalink
add length check to get_version (#545)
Browse files Browse the repository at this point in the history
  • Loading branch information
carl-wallace authored Dec 20, 2023
1 parent 3e31fe8 commit c0f3a2f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ impl<'tx> Transaction<'tx> {
// get version from device
let response = Apdu::new(Ins::GetVersion).transmit(self, 261)?;

if !response.is_success() {
if !response.is_success() || response.data().is_empty() {
return Err(Error::GenericError);
}

Expand Down

0 comments on commit c0f3a2f

Please sign in to comment.