[syslinux:obsolete-20140121] localboot: Clear register image before using
syslinux-bot for H. Peter Anvin
hpa at linux.intel.com
Wed Feb 20 18:21:35 PST 2019
Commit-ID: 52db71c1a94c07b27f23048adbce9be1583c146f
Gitweb: http://www.syslinux.org/commit/52db71c1a94c07b27f23048adbce9be1583c146f
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:15:52 -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 a4df9171..39ffc8cb 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