Skip to content

Commit 27926ce

Browse files
committed
protos/multiboot: Fix out-of-bounds dummy IDTR construction and use
1 parent 0e3b674 commit 27926ce

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

common/protos/multiboot_32.asm_x86

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ section .text
44
global multiboot_spinup_32:
55
multiboot_spinup_32:
66
sub esp, 6
7-
mov word [esp-2], 0x3ff
8-
mov dword [esp], 0
9-
lidt [esp-2]
7+
mov word [esp], 0x3ff
8+
mov dword [esp+2], 0
9+
lidt [esp]
1010
add esp, 6
1111

1212
add esp, 4 ; return address

0 commit comments

Comments
 (0)