Commit c2ee4dfd authored by Konstantin Belousov's avatar Konstantin Belousov
Browse files

ia32_get_fpcontext(): xfpusave can be legitimately NULL

Reported by:	cy
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Fixes:	bd9e0f5d
parent ae5a522c
......@@ -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],
mcp->mc_fpformat = fpuformat();
if (xfpusave == NULL)
if (!use_xsave || cpu_max_ext_state_size <= sizeof(struct savefpu)) {
*xfpusave_len = 0;
*xfpusave = NULL;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment