Alexandre Julliard : libwine: Set a non-null entry for the GDT selector to make sure it' s properly reserved.

Alexandre Julliard julliard at winehq.org
Fri Apr 21 15:18:17 CDT 2017


Module: wine
Branch: master
Commit: 2b1b7a0a80951700e56231d1310e0853564c9c13
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=2b1b7a0a80951700e56231d1310e0853564c9c13

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Fri Apr 21 18:55:17 2017 +0200

libwine: Set a non-null entry for the GDT selector to make sure it's properly reserved.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 libs/wine/ldt.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libs/wine/ldt.c b/libs/wine/ldt.c
index 0946407..4ecd48a 100644
--- a/libs/wine/ldt.c
+++ b/libs/wine/ldt.c
@@ -384,8 +384,10 @@ unsigned short wine_ldt_alloc_fs(void)
         global_fs_sel = wine_get_fs();
         if (global_fs_sel && is_gdt_sel(global_fs_sel)) return global_fs_sel;
 
+        memset( &ldt_info, 0, sizeof(ldt_info) );
         ldt_info.entry_number = -1;
-        fill_modify_ldt_struct( &ldt_info, &null_entry );
+        ldt_info.seg_32bit = 1;
+        ldt_info.usable = 1;
         if ((ret = set_thread_area( &ldt_info ) < 0))
         {
             global_fs_sel = 0;  /* don't try it again */




More information about the wine-cvs mailing list