summaryrefslogtreecommitdiff
path: root/core/init.inc
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-05-23 21:38:51 -0700
committerH. Peter Anvin <hpa@zytor.com>2009-05-23 21:38:51 -0700
commit9e4f43ff4ea1eff8d87376c2009b7b248ff6dc53 (patch)
tree8c7f9f4dc68c5e0109e0359144baaaa09f3a8787 /core/init.inc
parentfe3240ceb70e61c42a0d3224f065b67eafe60711 (diff)
downloadsyslinux-9e4f43ff4ea1eff8d87376c2009b7b248ff6dc53.tar.gz
core: make decompression of the PM code actually work
We would correctly decompress the PM code, and then reject it because of an incorrect length comparison. Fix. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'core/init.inc')
-rw-r--r--core/init.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/init.inc b/core/init.inc
index d50ff8af..5f90b0b0 100644
--- a/core/init.inc
+++ b/core/init.inc
@@ -25,7 +25,7 @@ common_init:
; Decompress PM code to its target location
pm_call pm_decompress
- cmp ecx,__pm_code_len
+ cmp eax,__pm_code_len
jne kaboom
;
@@ -79,6 +79,7 @@ pm_decompress:
push dword 0x100000
call _lzo1x_decompress_asm_fast
add esp,16
+ pop RM_EAX ; Decompressed size
; Zero bss sections (but not .earlybss, since it may
; contain already-live data.)
@@ -93,7 +94,6 @@ pm_decompress:
mov ecx,__uibss_auxseg_dwords
rep stosd
- pop ecx ; Decompressed size
ret
section .data16