From ec39ae02fdcfa7fa087191c2d6b7b1d4693ce960 Mon Sep 17 00:00:00 2001 From: Alex Duchesne Date: Sun, 21 Jul 2024 18:30:02 -0400 Subject: [PATCH] Don't check for end, just stop on first invalid type --- updater/main/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/updater/main/main.c b/updater/main/main.c index 02bc954e0..18e93447b 100644 --- a/updater/main/main.c +++ b/updater/main/main.c @@ -177,7 +177,7 @@ void app_main(void) const esp_partition_info_t *part = &img->partitions[i]; if (part->magic == ESP_PARTITION_MAGIC) { - if (part->type == PART_TYPE_END) + if (part->type != PART_TYPE_APP && part->type != PART_TYPE_DATA) break; // FIXME: label might not be nul-terminated, we should move it to a buffer and ensure it is if (fseek(fp, part->pos.offset, SEEK_SET) == 0 && fread(partition_buffer, part->pos.size, 1, fp))