mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-02-13 18:57:12 +08:00
fix: 'hw version' buffer overflow
This commit is contained in:
parent
4172ea6c19
commit
d393b6c60b
1 changed files with 4 additions and 8 deletions
|
@ -252,20 +252,16 @@ int CmdVersion(const char *Cmd) {
|
||||||
#else
|
#else
|
||||||
PrintAndLogEx(NORMAL, "\n\e[34mProxmark3 RFID instrument\e[0m\n");
|
PrintAndLogEx(NORMAL, "\n\e[34mProxmark3 RFID instrument\e[0m\n");
|
||||||
#endif
|
#endif
|
||||||
char s[40] = {0};
|
char s[50] = {0};
|
||||||
int i = 0;
|
|
||||||
#if defined(WITH_FLASH) || defined(WITH_SMARTCARD)
|
#if defined(WITH_FLASH) || defined(WITH_SMARTCARD)
|
||||||
strncat(s, "build for RDV40 with ", 22);
|
strncat(s, "build for RDV40 with ", sizeof(s) - strlen(s) - 1);
|
||||||
i = 15;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WITH_FLASH
|
#ifdef WITH_FLASH
|
||||||
strncat(s, "flashmem; ", 10);
|
strncat(s, "flashmem; ", sizeof(s) - strlen(s) - 1);
|
||||||
i += 10;
|
|
||||||
#endif
|
#endif
|
||||||
#ifdef WITH_SMARTCARD
|
#ifdef WITH_SMARTCARD
|
||||||
strncat(s+i, "smartcard; ", 11);
|
strncat(s, "smartcard; ", sizeof(s) - strlen(s) - 1);
|
||||||
i += 11;
|
|
||||||
#endif
|
#endif
|
||||||
PrintAndLogEx(NORMAL, "\n [ CLIENT ]");
|
PrintAndLogEx(NORMAL, "\n [ CLIENT ]");
|
||||||
PrintAndLogEx(NORMAL, " client: iceman %s \n", s);
|
PrintAndLogEx(NORMAL, " client: iceman %s \n", s);
|
||||||
|
|
Loading…
Reference in a new issue