If __thread_get_state failed, there is no xstate level to check.
ok is 0 already and the memory exists, but better not read uninitialized
memory.
---
 sysdeps/mach/hurd/x86/trampoline.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sysdeps/mach/hurd/x86/trampoline.c 
b/sysdeps/mach/hurd/x86/trampoline.c
index db756e8a1f..02510b178c 100644
--- a/sysdeps/mach/hurd/x86/trampoline.c
+++ b/sysdeps/mach/hurd/x86/trampoline.c
@@ -289,7 +289,7 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, const 
struct sigaction *action
                                       (thread_state_t) stackframe->xstate, 
&got)
                 && got == (xstate_size / sizeof (int)));
 
-         if (((struct i386_xfloat_state*) stackframe->xstate)->fp_save_kind > 
5)
+         if (ok && ((struct i386_xfloat_state*) 
stackframe->xstate)->fp_save_kind > 5)
            /* We support up to XSAVES */
            ok = 0;
 
-- 
2.47.2


Reply via email to