summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--aoc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/aoc.c b/aoc.c
index b17a7c0..14e2ac9 100644
--- a/aoc.c
+++ b/aoc.c
@@ -2556,6 +2556,9 @@ static struct aoc_section_header *find_ramdump_section(struct aoc_ramdump_header
{
int i;
+ if (ramdump_header->num_sections != RAMDUMP_NUM_SECTIONS)
+ return NULL;
+
for (i = 0; i < ramdump_header->num_sections; i++)
if (ramdump_header->sections[i].type == section_type)
return &ramdump_header->sections[i];