From: hpa Date: Thu, 5 Apr 2001 06:21:53 +0000 (+0000) Subject: Actually make NASM enforce the checkpoints. X-Git-Tag: syslinux-3.11~900 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dd80badc521c8b865df8c4b63ebd2f5e2d5b4c4a;p=platform%2Fupstream%2Fsyslinux.git Actually make NASM enforce the checkpoints. --- diff --git a/ldlinux.asm b/ldlinux.asm index 12ab164..4f02fa0 100644 --- a/ldlinux.asm +++ b/ldlinux.asm @@ -738,6 +738,10 @@ bailmsg: db 'Boot failed', 0Dh, 0Ah, 0 bs_checkpt equ $ ; Must be <= 1EFh +%if (bs_checkpt-$$) > 0x1EF +%error "Boot sector overflow" +%endif + zb 1EFh-($-$$) bs_magic equ $ ; From here to the magic_len equ ; must match ldlinux_magic @@ -1045,6 +1049,10 @@ safedumpregs: rl_checkpt equ $ ; Must be <= 400h +%if (rl_checkpt-$$) > 0x400 +%error "Sector 1 overflow" +%endif + ; ---------------------------------------------------------------------------- ; End of code and data that have to be in the first sector ; ----------------------------------------------------------------------------