Skip to content

feat: removed panic from darwin read error #24

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alexanderturner
Copy link

Darwin would panic if scardTransmit failed. This would occur during partial reads, such as if someone removes the card too quickly during a tap, resulting in applications implementing this to panic. This is undesired behaviour. I've amended this to return SCARD_F_INTERNAL_ERROR from PCSC instead, which I think is suitable.

Please let me know if there are any other suggestions to remediate this

@ebfe
Copy link
Owner

ebfe commented Aug 2, 2024

I don't see how this fixes the described issue. The changed code only panics if an unknown Protocol was passed to scardTransmit which is entirely up to the caller.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants