From 2b1b7a0a80951700e56231d1310e0853564c9c13 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Fri, 21 Apr 2017 18:55:17 +0200 Subject: [PATCH] libwine: Set a non-null entry for the GDT selector to make sure it's properly reserved. Signed-off-by: Alexandre Julliard --- 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 0946407625e..4ecd48a586f 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 */