mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2024-11-11 01:55:38 +08:00
fix gcc8 failure, man sprintf:
Some programs imprudently rely on code such as the following sprintf(buf, "%s some further text", buf); to append text to buf. However, the standards explicitly note that the results are undefined if source and destination buffers overlap when calling sprintf(), snprintf(), vsprintf(), and vs‐ nprintf(). Depending on the version of gcc(1) used, and the compiler options employed, calls such as the above will not produce the expected results.
This commit is contained in:
parent
a41914947a
commit
63711dd312
1 changed files with 2 additions and 2 deletions
|
@ -2262,11 +2262,11 @@ static int CmdT55xxDump(const char *Cmd) {
|
|||
strcpy (preferredName,"lf-t55xx");
|
||||
for (uint8_t i = 1; i <= 7; i++) {
|
||||
if ((cardmem[i].blockdata != 0x00) && (cardmem[i].blockdata != 0xFFFFFFFF))
|
||||
sprintf (preferredName,"%s-%08X",preferredName,cardmem[i].blockdata);
|
||||
sprintf (preferredName + strlen(preferredName),"-%08X",cardmem[i].blockdata);
|
||||
else
|
||||
break;
|
||||
}
|
||||
sprintf (preferredName,"%s-data",preferredName);
|
||||
strcat (preferredName,"-data");
|
||||
}
|
||||
|
||||
// Swap endian so the files match the txt display
|
||||
|
|
Loading…
Reference in a new issue