Closed wh201906 closed 8 months ago
You are welcome to add an entry to the CHANGELOG.md as well
Great catch!
those return values 0,1 should be PM3_SUCCESS (0) and PM3_E...
I just reused the existing code.
If you prefer the PM3_SUCCESS
and PM3_E...
style, I can make a new PR for that.
I know you reused the existing code. We still can make it follow our prefered return values. One of the many places still not converted
Go for it, make a PR with the defined return values
but remember to handle the negative return values when failing..
This fixes #2184
ExchangeAPDUSC()
incmdsmartcard.c
doesn't return 1 if the retry fails, which is different from the behavior of the first try.Iso7816ExchangeEx()
will treat the negative length as the valid one when the failed retry occurs. This causes overflow when accessingresult[*result_len]