mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-08-14 10:36:58 -07:00
parent
151a33c027
commit
d3c606574f
1 changed files with 2 additions and 2 deletions
|
@ -584,7 +584,7 @@ int CmdSmartUpgrade(const char *Cmd) {
|
|||
return 1;
|
||||
}
|
||||
|
||||
char sha512filename[FILE_PATH_SIZE];
|
||||
char sha512filename[FILE_PATH_SIZE] = {'\0'};
|
||||
char *bin_extension = filename;
|
||||
char *dot_position = NULL;
|
||||
while ((dot_position = strchr(bin_extension, '.')) != NULL) {
|
||||
|
@ -595,7 +595,7 @@ int CmdSmartUpgrade(const char *Cmd) {
|
|||
|| !strcmp(bin_extension, "bin")
|
||||
#endif
|
||||
) {
|
||||
strncpy(sha512filename, filename, strlen(filename) - strlen("bin"));
|
||||
memcpy(sha512filename, filename, strlen(filename) - strlen("bin"));
|
||||
strcat(sha512filename, "sha512.txt");
|
||||
} else {
|
||||
PrintAndLogEx(FAILED, "Filename extension of Firmware Upgrade File must be .BIN");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue