Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ATRDecodeAtr: always initialize the return values
Always set a value to availableProtocols and currentProtocol before any return in error. Thanks to Maksim Ivanov for the bug report "[Pcsclite-muscle] Missing checks of ATRDecodeAtr returns" https://lists.infradead.org/pipermail/pcsclite-muscle/2020-July/001097.html " Hello, The callers of the ATRDecodeAtr() function (SCardConnect() and SCardReconnect() in winscard.c) don't check its return value, which might potentially cause reads of uninitialized variables |availableProtocols| and |defaultProtocol| and unexpected side effects. Regards, Maksim "
- Loading branch information