From: H. Peter Anvin Date: Fri, 2 Jul 2010 00:59:30 +0000 (-0700) Subject: comboot.inc: vk_append is a field in a struct, not an address X-Git-Tag: syslinux-4.01-pre2~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ff07f39d96d765d0ebec72fc02044707d217d90c;p=profile%2Fivi%2Fsyslinux.git comboot.inc: vk_append is a field in a struct, not an address We want to use VKernelBuf as temporary storage, not vk_append. vk_append is an offset into a larger buffer, and we ended up corrupting low BIOS memory. Reported-by: Joseph Cihula Signed-off-by: H. Peter Anvin --- diff --git a/core/comboot.inc b/core/comboot.inc index 65b20be..59db7ec 100644 --- a/core/comboot.inc +++ b/core/comboot.inc @@ -1,7 +1,7 @@ ;; ----------------------------------------------------------------------- ;; ;; Copyright 1994-2009 H. Peter Anvin - All Rights Reserved -;; Copyright 2009 Intel Corporation; author: H. Peter Anvin +;; Copyright 2009-2010 Intel Corporation; author: H. Peter Anvin ;; ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by @@ -753,11 +753,11 @@ comapi_runkernel: ; It's not just possible, but quite likely, that ES:BX ; points into real_mode_seg or xfer_buf_seg, so we ; need to exercise some special care here... use - ; vk_append for temporary storage. + ; VKernelBuf for temporary storage. push ds mov ds,P_ES mov si,P_BX - mov di,vk_append + mov di,VKernelBuf call strcpy pop ds @@ -786,7 +786,7 @@ comapi_runkernel: push es mov dx,real_mode_seg mov es,dx - mov si,vk_append + mov si,VKernelBuf mov di,cmd_line_here call strcpy mov word [es:di-1],' ' ; Simulate APPEND: space plus null