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 6846262..bee9c49 100644
--- a/aoc.c
+++ b/aoc.c
@@ -1659,6 +1659,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];