feat(gcc): update cross toolchain GCC to v8.x

This commit is contained in:
donghengqaz
2020-02-12 10:22:49 +08:00
committed by Dong Heng
parent c67cc06436
commit fd54106a97
155 changed files with 308 additions and 15402 deletions

View File

@@ -204,9 +204,11 @@ static esp_err_t load_partitions()
item->info.encrypted = false;
#endif
const int label_size = sizeof(it->label);
// it->label may not be zero-terminated
strncpy(item->info.label, (const char*) it->label, sizeof(it->label));
item->info.label[sizeof(it->label)] = 0;
strncpy(item->info.label, (const char*) it->label, label_size);
item->info.label[label_size] = 0;
// add it to the list
if (last == NULL) {
SLIST_INSERT_HEAD(&s_partition_list, item, next);