miguelbalboa / rfid

Arduino RFID Library for MFRC522
The Unlicense
2.74k stars 1.43k forks source link

Fix OpenUidBackdoor received data size. #551

Closed hktaskin closed 3 years ago

hktaskin commented 3 years ago

In OpenUidBackdoor function, received variable gets random value on each boot, when it is set to 0, the function does not work properly. Exact size definition has been added for the "received" variable in OpenUidBackdoor function. Tested with Arduino Nano using ChangeUID example.

Q A
Bug fix? yes
New feature? no
Doc update? no
BC breaks? no
Deprecations? no
Fixed tickets -
Rotzbua commented 3 years ago

Uninitialized variable as bug: confirmed Solution: sufficient, but please note that in general sizeof(array) in c(++) is bad practice!

Thanks for pr!