mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
code scan has an issue with this i guess
This commit is contained in:
parent
c02f45a767
commit
6ed6571430
1 changed files with 6 additions and 4 deletions
|
@ -436,14 +436,16 @@ static uint16_t printHexLine(uint16_t tracepos, uint16_t traceLen, uint8_t *trac
|
|||
* we use format timestamp, newline, offset (0x000000), pseudo header, data
|
||||
* `text2pcap -t "%S." -l 264 -n <input-text-file> <output-pcapng-file>`
|
||||
*/
|
||||
size_t line_len = (hdr->data_len * 3) + 1;
|
||||
int line_len = (hdr->data_len * 3) + 1;
|
||||
char line[line_len];
|
||||
char *ptr = line;
|
||||
|
||||
for (int i = 0; i < hdr->data_len ; i++) {
|
||||
int n = snprintf(ptr, line_len, "%02x ", hdr->frame[i]);
|
||||
ptr += n;
|
||||
line_len -= n;
|
||||
ptr += snprintf(ptr, line_len, "%02x ", hdr->frame[i]);
|
||||
line_len -= 3;
|
||||
if (line_len <= 0) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
char data_len_str[5];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue