aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2014-01-21 07:15:52 -0800
committerH. Peter Anvin <hpa@linux.intel.com>2014-01-21 07:15:52 -0800
commit52db71c1a94c07b27f23048adbce9be1583c146f (patch)
tree7bdd2f9347b7fdee103dd27dedcd7bf11d069453
parentba3c1d66fc9f6638ea22949e71d10dc4f7e83796 (diff)
downloadsyslinux-52db71c1a94c07b27f23048adbce9be1583c146f.tar.gz
syslinux-52db71c1a94c07b27f23048adbce9be1583c146f.tar.xz
syslinux-52db71c1a94c07b27f23048adbce9be1583c146f.zip
localboot: Clear register image before usingobsolete-20140121
Using a register image on the stack without initializing it is not a good idea. Reported-by: Erwan Velu <erwanaliasr1@gmail.com> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
-rw-r--r--core/localboot.c1
1 files changed, 1 insertions, 0 deletions
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);