Fix OpenUidBackdoor received data size.

Exact size definition for the "received" variable in OpenUidBackdoor function.
This commit is contained in:
Halil Kemal TASKIN 2021-02-17 18:30:05 +03:00 committed by GitHub
parent ce05181537
commit 0a568b45ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1717,7 +1717,7 @@ bool MFRC522::MIFARE_OpenUidBackdoor(bool logErrors) {
byte validBits = 7; /* Our command is only 7 bits. After receiving card response,
this will contain amount of valid response bits. */
byte response[32]; // Card's response is written here
byte received;
byte received = sizeof(response);
MFRC522::StatusCode status = PCD_TransceiveData(&cmd, (byte)1, response, &received, &validBits, (byte)0, false); // 40
if(status != STATUS_OK) {
if(logErrors) {