Check cmd size

This commit is contained in:
nemanjan00 2022-03-21 21:34:38 +01:00
parent e4c641b708
commit 24d3094012

View file

@ -553,7 +553,11 @@ void annotateIso15693(char *exp, size_t size, uint8_t *cmd, uint8_t cmdsize) {
snprintf(exp, size, "LOCKBLOCK");
return;
case ISO15693_READ_MULTI_BLOCK:
snprintf(exp, size, "READ_MULTI_BLOCK(%d-%d)", cmd[2], (cmd[2] + cmd[3]));
if (cmdsize == 6) {
snprintf(exp, size, "READ_MULTI_BLOCK(%d-%d)", cmd[2], (cmd[2] + cmd[3]));
} else {
snprintf(exp, size, "READ_MULTI_BLOCK");
}
return;
case ISO15693_WRITE_MULTI_BLOCK:
snprintf(exp, size, "WRITE_MULTI_BLOCK");