mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-02-24 16:14:59 +08:00
cmdtrace: avoid 'strncat output may be truncated' warning
This commit is contained in:
parent
a5c6130c7a
commit
91d9463c2a
1 changed files with 2 additions and 4 deletions
|
@ -159,10 +159,8 @@ static uint16_t printHexLine(uint16_t tracepos, uint16_t traceLen, uint8_t *trac
|
|||
char temp_str2[3] = {0};
|
||||
|
||||
sprintf(data_len_str, "%04x", hdr->data_len);
|
||||
strncat(temp_str1, data_len_str, 2);
|
||||
temp_str1[2] = '\0';
|
||||
strncat(temp_str2, data_len_str + 2, 2);
|
||||
temp_str2[2] = '\0';
|
||||
memmove(temp_str1, data_len_str, 2);
|
||||
memmove(temp_str2, data_len_str + 2, 2);
|
||||
|
||||
PrintAndLogEx(NORMAL, "0.%010u", hdr->timestamp);
|
||||
PrintAndLogEx(NORMAL, "000000 00 %s %s %s %s",
|
||||
|
|
Loading…
Reference in a new issue