From: H. Peter Anvin Date: Fri, 21 Sep 2007 23:22:58 +0000 (-0700) Subject: comboot: fix memory overwrite bug X-Git-Tag: syslinux-3.52-pre9~2 X-Git-Url: http://git.kernel.org/?p=boot%2Fsyslinux%2Fsyslinux.git;a=commitdiff_plain;h=426d986dbc77abf2247b08c44c18bf9a478c2e8e 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". --- diff --git a/comboot.inc b/comboot.inc index 3c9df5f..ffc9425 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