mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
fix: "trace list" too short array for explanation
This commit is contained in:
parent
c49bfa0849
commit
70add3fabe
1 changed files with 6 additions and 6 deletions
|
@ -211,7 +211,7 @@ static uint16_t printTraceLine(uint16_t tracepos, uint16_t traceLen, uint8_t *tr
|
||||||
uint16_t data_len, parity_len;
|
uint16_t data_len, parity_len;
|
||||||
uint32_t duration, timestamp, first_timestamp, EndOfTransmissionTimestamp;
|
uint32_t duration, timestamp, first_timestamp, EndOfTransmissionTimestamp;
|
||||||
uint8_t topaz_reader_command[9];
|
uint8_t topaz_reader_command[9];
|
||||||
char explanation[30] = {0};
|
char explanation[40] = {0};
|
||||||
uint8_t mfData[32] = {0};
|
uint8_t mfData[32] = {0};
|
||||||
size_t mfDataLen = 0;
|
size_t mfDataLen = 0;
|
||||||
|
|
||||||
|
@ -296,7 +296,7 @@ static uint16_t printTraceLine(uint16_t tracepos, uint16_t traceLen, uint8_t *tr
|
||||||
//2 Not crc-command
|
//2 Not crc-command
|
||||||
|
|
||||||
//--- Draw the data column
|
//--- Draw the data column
|
||||||
char line[18][110] = {{0}};
|
char line[18][120] = {{0}};
|
||||||
|
|
||||||
for (int j = 0; j < data_len && j / 18 < 18; j++) {
|
for (int j = 0; j < data_len && j / 18 < 18; j++) {
|
||||||
|
|
||||||
|
@ -315,20 +315,20 @@ static uint16_t printTraceLine(uint16_t tracepos, uint16_t traceLen, uint8_t *tr
|
||||||
&& (isResponse || protocol == ISO_14443A)
|
&& (isResponse || protocol == ISO_14443A)
|
||||||
&& (oddparity8(frame[j]) != ((parityBits >> (7 - (j & 0x0007))) & 0x01))) {
|
&& (oddparity8(frame[j]) != ((parityBits >> (7 - (j & 0x0007))) & 0x01))) {
|
||||||
|
|
||||||
snprintf(line[j / 18] + ((j % 18) * 4), 110, "%02x! ", frame[j]);
|
snprintf(line[j / 18] + ((j % 18) * 4), 120, "%02x! ", frame[j]);
|
||||||
} else if (protocol == ICLASS && isResponse == false) {
|
} else if (protocol == ICLASS && isResponse == false) {
|
||||||
uint8_t parity = 0;
|
uint8_t parity = 0;
|
||||||
for (int i = 0; i < 6; i++) {
|
for (int i = 0; i < 6; i++) {
|
||||||
parity ^= ((frame[0] >> i) & 1);
|
parity ^= ((frame[0] >> i) & 1);
|
||||||
}
|
}
|
||||||
if (parity == ((frame[0] >> 7) & 1)) {
|
if (parity == ((frame[0] >> 7) & 1)) {
|
||||||
snprintf(line[j / 18] + ((j % 18) * 4), 110, "%02x ", frame[j]);
|
snprintf(line[j / 18] + ((j % 18) * 4), 120, "%02x ", frame[j]);
|
||||||
} else {
|
} else {
|
||||||
snprintf(line[j / 18] + ((j % 18) * 4), 110, "%02x! ", frame[j]);
|
snprintf(line[j / 18] + ((j % 18) * 4), 120, "%02x! ", frame[j]);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
snprintf(line[j / 18] + ((j % 18) * 4), 110, "%02x ", frame[j]);
|
snprintf(line[j / 18] + ((j % 18) * 4), 120, "%02x ", frame[j]);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue