mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-01-02 21:54:10 +08:00
fix: spurious chars because strlen doesnt count ending zero
This commit is contained in:
parent
0eea50f5a0
commit
17f97abfcb
1 changed files with 3 additions and 3 deletions
|
@ -368,10 +368,10 @@ void SendVersion(void) {
|
|||
struct p payload;
|
||||
payload.id = *(AT91C_DBGU_CIDR);
|
||||
payload.section_size = text_and_rodata_section_size + compressed_data_section_size;
|
||||
payload.versionstr_len = strlen(VersionString);
|
||||
memcpy(payload.versionstr, VersionString, strlen(VersionString));
|
||||
payload.versionstr_len = strlen(VersionString) + 1;
|
||||
memcpy(payload.versionstr, VersionString, payload.versionstr_len);
|
||||
|
||||
reply_ng(CMD_VERSION, PM3_SUCCESS, (uint8_t *)&payload, 12 + strlen(VersionString));
|
||||
reply_ng(CMD_VERSION, PM3_SUCCESS, (uint8_t *)&payload, 12 + payload.versionstr_len);
|
||||
}
|
||||
|
||||
// measure the Connection Speed by sending SpeedTestBufferSize bytes to client and measuring the elapsed time.
|
||||
|
|
Loading…
Reference in a new issue