aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2025-04-21 19:45:02 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2025-04-21 19:46:24 +0200
commit0f2df19d9535d234b31c65f84a6c67ac2e0bd027 (patch)
treedf70c78e38c90566188e56a48451760908029132
parent8d54b428cfe98c21049f94c8af3bf302e44091e9 (diff)
downloadglibc-0f2df19d9535d234b31c65f84a6c67ac2e0bd027.zip
glibc-0f2df19d9535d234b31c65f84a6c67ac2e0bd027.tar.gz
glibc-0f2df19d9535d234b31c65f84a6c67ac2e0bd027.tar.bz2
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.
-rw-r--r--sysdeps/mach/hurd/x86/trampoline.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sysdeps/mach/hurd/x86/trampoline.c b/sysdeps/mach/hurd/x86/trampoline.c
index db756e8..02510b1 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;