bootloader icon indicating copy to clipboard operation
bootloader copied to clipboard

Overflow error

Open samsa1 opened this issue 3 years ago • 0 comments

When writing an OS where the memory is exactly mapped from 0xffff_ff00_0000_0000 with a RAM of size0x0000_0100_0000_000 the following line does an overflow which makes the bootloader panic even if it should not.

https://github.com/rust-osdev/bootloader/blob/77c952587bf78436b3d6993204e2c4bb3609084a/src/binary/level_4_entries.rs#L106

I'll could recommend changing the line to start + (size - 1) if we know that size != 0.

Otherwise, thank you for the great work

samsa1 avatar Nov 07 '22 16:11 samsa1