Fix WRITEBLOCK read out-of-bounds

This commit is contained in:
Aaron Tulino (Aaronjamt) committed 2026-06-13 17:37:07 -07:00
1 parent e166cb2f85
commit 665a378925
1 file changed
+1 -1
+1 -1
View File
@@ -424,7 +424,7 @@ int applyIso14443a(char *exp, size_t size, uint8_t *cmd, uint8_t cmdsize, bool i
case MIFARE_ULC_WRITE : {
if (cmd[1] < 0x21)
snprintf(exp, size, "WRITEBLOCK(" _MAGENTA_("%d") ")", cmd[1]);
else
else if (cmdsize >= 6)
// outside limits, useful for some tags...
snprintf(exp, size, "WRITEBLOCK(" _MAGENTA_("%d") ") (%s)", cmd[1], sprint_hex_inrow(cmd + 2, 4));
break;