PrintAndLog("# changing the DCF is irreversible #");
PrintAndLog("#####################################");
PrintAndLog("do youe really want to continue? y(es) n(o)");
- scanf(" %c", &answer);
- if (answer == 'y' || answer == 'Y') {
+ if (scanf(" %c", &answer) > 0 && (answer == 'y' || answer == 'Y')) {
SendCommand(&c);
return 0;
}
int CmdLegicCalcCrc8(const char *Cmd){
- uint8_t *data;
+ uint8_t *data = NULL;
uint8_t cmdp = 0, uidcrc = 0, type=0;
bool errors = false;
int len = 0;