diff options
author | Erwan Velu <erwan@enovance.com> | 2014-01-22 23:57:12 +0100 |
---|---|---|
committer | Erwan Velu <erwan@enovance.com> | 2014-01-22 23:57:12 +0100 |
commit | 3150c7839640859e8ec6ea0243002309e5f9c068 (patch) | |
tree | 275ff162a0252960548013afbe8ff7da7e9cffc0 /memdisk | |
parent | 7a9978f280e1d291f6fac419e7c2a0178e9e5d6b (diff) | |
download | syslinux-3150c7839640859e8ec6ea0243002309e5f9c068.tar.gz syslinux-3150c7839640859e8ec6ea0243002309e5f9c068.tar.xz syslinux-3150c7839640859e8ec6ea0243002309e5f9c068.zip |
com32sys_t inreg shall be zeroified prior intcall
As per commit f775e740a3a817a4ff5ba26bea99dbfd735456b3, inreg parameters
of intcall() shall be zeroified.
Having unclean inreg could trigger bad behaviors on some hosts.
This patch is about adding memset() calls prior any intcall() :
- some intcall didn't had any memset at all
- some successive intcall() calls didn't memset inreg in between calls
Diffstat (limited to 'memdisk')
-rw-r--r-- | memdisk/conio.c | 1 | ||||
-rw-r--r-- | memdisk/setup.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/memdisk/conio.c b/memdisk/conio.c index d1f0862c..33be13ba 100644 --- a/memdisk/conio.c +++ b/memdisk/conio.c @@ -23,6 +23,7 @@ int putchar(int ch) { com32sys_t regs; + memset(®s, 0, sizeof regs); if (ch == '\n') { /* \n -> \r\n */ diff --git a/memdisk/setup.c b/memdisk/setup.c index 72c67852..992db58f 100644 --- a/memdisk/setup.c +++ b/memdisk/setup.c @@ -1223,6 +1223,7 @@ void setup(const struct real_mode_args *rm_args_ptr) if (getcmditem("pause") != CMD_NOTFOUND) { puts("press any key to boot... "); + memset(®s, 0, sizeof regs); regs.eax.w[0] = 0; intcall(0x16, ®s, NULL); } |