[syslinux:master] localboot: Clear register image before using
syslinux-bot for H. Peter Anvin
hpa at linux.intel.com
Tue Jan 21 07:21:05 PST 2014
Commit-ID: f775e740a3a817a4ff5ba26bea99dbfd735456b3
Gitweb: http://www.syslinux.org/commit/f775e740a3a817a4ff5ba26bea99dbfd735456b3
Author: H. Peter Anvin <hpa at linux.intel.com>
AuthorDate: Tue, 21 Jan 2014 07:15:52 -0800
Committer: H. Peter Anvin <hpa at linux.intel.com>
CommitDate: Tue, 21 Jan 2014 07:18:41 -0800
localboot: Clear register image before using
Using a register image on the stack without initializing it is not a
good idea.
Reported-by: Erwan Velu <erwanaliasr1 at gmail.com>
Signed-off-by: H. Peter Anvin <hpa at linux.intel.com>
---
core/localboot.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/core/localboot.c b/core/localboot.c
index 0f4b582..b68d3f2 100644
--- a/core/localboot.c
+++ b/core/localboot.c
@@ -57,6 +57,7 @@ __export void local_boot(int16_t ax)
* Load boot sector from the specified BIOS device and jump to
* it.
*/
+ memset(&ireg, 0, sizeof ireg);
ireg.edx.b[0] = ax & 0xff;
ireg.eax.w[0] = 0; /* Reset drive */
__intcall(0x13, &ireg, NULL);
More information about the Syslinux-commits
mailing list