mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
spiffs: test: check for truncation in snprintf call
This commit is contained in:
parent
9ba5896d86
commit
324004f7b3
@ -291,7 +291,8 @@ void test_spiffs_readdir_many_files(const char* dir_prefix)
|
||||
if (!de) {
|
||||
break;
|
||||
}
|
||||
snprintf(file_name, sizeof(file_name), "%s/%s", dir_prefix, de->d_name);
|
||||
int len = snprintf(file_name, sizeof(file_name), "%s/%s", dir_prefix, de->d_name);
|
||||
assert(len < sizeof(file_name));
|
||||
unlink(file_name);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user