diff options
| author | Konstantin Belousov <kib@FreeBSD.org> | 2021-09-21 21:09:34 +0000 |
|---|---|---|
| committer | Konstantin Belousov <kib@FreeBSD.org> | 2021-09-21 21:17:06 +0000 |
| commit | c2ee4dfd04970f1597eea58bb30eb93e1ed5a491 (patch) | |
| tree | 8f517872a5cd7d3c7c9d947f20db960e3a66d452 | |
| parent | ae5a522cae7e95790e84274c4ba23bbd1e4f3033 (diff) | |
ia32_get_fpcontext(): xfpusave can be legitimately NULL
Reported by: cy
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Fixes: bd9e0f5df681da8b5ef05
| -rw-r--r-- | sys/amd64/ia32/ia32_signal.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/amd64/ia32/ia32_signal.c b/sys/amd64/ia32/ia32_signal.c index 1ca19072a1dc..ab7100f5b9fb 100644 --- a/sys/amd64/ia32/ia32_signal.c +++ b/sys/amd64/ia32/ia32_signal.c @@ -99,6 +99,8 @@ ia32_get_fpcontext(struct thread *td, struct ia32_mcontext *mcp, bcopy(get_pcb_user_save_td(td), &mcp->mc_fpstate[0], sizeof(mcp->mc_fpstate)); mcp->mc_fpformat = fpuformat(); + if (xfpusave == NULL) + return; if (!use_xsave || cpu_max_ext_state_size <= sizeof(struct savefpu)) { *xfpusave_len = 0; *xfpusave = NULL; |
