From 457dfdd7a4693444170d350ce7df01a1fd4ccdb8 Mon Sep 17 00:00:00 2001 From: Julien CLEMENT Date: Fri, 16 Jul 2021 03:07:46 +0200 Subject: [PATCH] feat(idt): specify idt_entries_descriptors length for compile safety Signed-off-by: Julien CLEMENT --- k/idt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/k/idt.c b/k/idt.c index 5975f40..7392c42 100644 --- a/k/idt.c +++ b/k/idt.c @@ -3,7 +3,7 @@ static struct idt idt = { 0 }; -static struct idt_entry_descriptor idt_entries_descriptors[] = { +static struct idt_entry_descriptor idt_entries_descriptors[IDT_NB_ENTRIES] = { {(uint32_t)&isr_divide, KERNEL_CS_SEGMENT_SELECTOR, INTERRUPT_TYPE}, // 0 {(uint32_t)&isr_debug, KERNEL_CS_SEGMENT_SELECTOR, INTERRUPT_TYPE}, // 1 {(uint32_t)&isr_nmi, KERNEL_CS_SEGMENT_SELECTOR, INTERRUPT_TYPE}, // 2