covery 263986

This commit is contained in:
iceman1001 2020-01-03 18:41:53 +01:00
commit 12885d6726

View file

@ -1332,6 +1332,7 @@ static int CmdHFFelicaRequestService(const char *Cmd) {
} }
i++; i++;
} }
if (!all_nodes) { if (!all_nodes) {
// Node Number // Node Number
if (param_getlength(Cmd, paramCount) == 2) { if (param_getlength(Cmd, paramCount) == 2) {
@ -1371,6 +1372,7 @@ static int CmdHFFelicaRequestService(const char *Cmd) {
if (!custom_IDm && !check_last_idm(data, datalen)) { if (!custom_IDm && !check_last_idm(data, datalen)) {
return PM3_EINVARG; return PM3_EINVARG;
} }
data[0] = int_to_hex(&datalen); data[0] = int_to_hex(&datalen);
data[1] = 0x02; // Service Request Command ID data[1] = 0x02; // Service Request Command ID
if (all_nodes) { if (all_nodes) {
@ -1742,7 +1744,7 @@ static int CmdHFFelicaCmdRaw(const char *Cmd) {
sscanf(buf, "%x", &temp); sscanf(buf, "%x", &temp);
data[datalen] = (uint8_t)(temp & 0xff); data[datalen] = (uint8_t)(temp & 0xff);
*buf = 0; *buf = 0;
if (++datalen >= sizeof(data)) { if (++datalen >= (sizeof(data) - 2)) {
if (crc) if (crc)
PrintAndLogEx(WARNING, "Buffer is full, we can't add CRC to your data"); PrintAndLogEx(WARNING, "Buffer is full, we can't add CRC to your data");
break; break;