mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 21:03:48 -07:00
coverity fix #308205
This commit is contained in:
parent
f65b5eb96d
commit
145a031922
1 changed files with 2 additions and 5 deletions
|
@ -170,12 +170,9 @@ static void save_to_flash(uint8_t *data, uint16_t datalen, char *filename) {
|
||||||
data[4], data[5], data[6], data[7]
|
data[4], data[5], data[6], data[7]
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
int name_len = SPIFFS_OBJ_NAME_LEN;
|
int fnlen = MIN(strlen(filename), SPIFFS_OBJ_NAME_LEN);
|
||||||
int filename_len = strlen(filename);
|
|
||||||
|
|
||||||
// if the given name len longer than buffer allows, cut it down to size
|
// if the given name len longer than buffer allows, cut it down to size
|
||||||
name_len = (name_len >= SPIFFS_OBJ_NAME_LEN) ? SPIFFS_OBJ_NAME_LEN : filename_len;
|
memcpy(fn, filename, fnlen);
|
||||||
memcpy(fn, filename, name_len);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int res;
|
int res;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue