From: Samuel Thibault Date: Mon, 21 Apr 2025 17:45:02 +0000 (+0200) Subject: hurd: Do not check for xstate level if it was not initialized X-Git-Tag: glibc-2.42~292 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0f2df19d9535d234b31c65f84a6c67ac2e0bd027;p=thirdparty%2Fglibc.git hurd: Do not check for xstate level if it was not initialized 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. --- 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;