Revert "Merge branch 'feature/support_gcc_v8.x' into 'master'"

This reverts merge request !1539
This commit is contained in:
Dong Heng
2020-09-29 17:25:55 +08:00
parent 70b26d8a2d
commit ed68a21f62
155 changed files with 15402 additions and 308 deletions

View File

@@ -204,11 +204,9 @@ 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, label_size);
item->info.label[label_size] = 0;
strncpy(item->info.label, (const char*) it->label, sizeof(it->label));
item->info.label[sizeof(it->label)] = 0;
// add it to the list
if (last == NULL) {
SLIST_INSERT_HEAD(&s_partition_list, item, next);