summaryrefslogtreecommitdiff
path: root/comboot.inc
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2007-09-21 16:22:58 -0700
committerH. Peter Anvin <hpa@zytor.com>2007-09-21 16:22:58 -0700
commit426d986dbc77abf2247b08c44c18bf9a478c2e8e (patch)
tree82b31e75e360864fe1aed2b0d1852701d4386a91 /comboot.inc
parentc691269f0bc370016362d50c5e25e4fd7b4eecdd (diff)
downloadsyslinux-426d986dbc77abf2247b08c44c18bf9a478c2e8e.tar.gz
comboot: fix memory overwrite bug
Fix memory overwrite bug, specifically, the use of BP after it might have gotten clobbered. Since at the point of use, BP is supposed to be == SP, we can just add "mov bp,sp".
Diffstat (limited to 'comboot.inc')
-rw-r--r--comboot.inc1
1 files changed, 1 insertions, 0 deletions
diff --git a/comboot.inc b/comboot.inc
index 3c9df5f2..ffc9425f 100644
--- a/comboot.inc
+++ b/comboot.inc
@@ -187,6 +187,7 @@ comboot_int21: cli
clc
call ax ; Call the invoked function
comboot_resume:
+ mov bp,sp ; In case the function clobbers BP
setc P_FLAGSL ; Propagate CF->error
popad
pop gs