Skip to content

feat: removed panic from darwin read error#24

Open
alexanderturner wants to merge 1 commit into
ebfe:masterfrom
qdynamicsco:qdyn/read-error-handling
Open

feat: removed panic from darwin read error#24
alexanderturner wants to merge 1 commit into
ebfe:masterfrom
qdynamicsco:qdyn/read-error-handling

Conversation

@alexanderturner

Copy link
Copy Markdown

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

ebfe commented Aug 2, 2024

Copy link
Copy Markdown
Owner

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