ia32_get_fpcontext(): xfpusave can be legitimately NULL
Reported by: cy
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Fixes: bd9e0f5df6
This commit is contained in:
@@ -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],
|
bcopy(get_pcb_user_save_td(td), &mcp->mc_fpstate[0],
|
||||||
sizeof(mcp->mc_fpstate));
|
sizeof(mcp->mc_fpstate));
|
||||||
mcp->mc_fpformat = fpuformat();
|
mcp->mc_fpformat = fpuformat();
|
||||||
|
if (xfpusave == NULL)
|
||||||
|
return;
|
||||||
if (!use_xsave || cpu_max_ext_state_size <= sizeof(struct savefpu)) {
|
if (!use_xsave || cpu_max_ext_state_size <= sizeof(struct savefpu)) {
|
||||||
*xfpusave_len = 0;
|
*xfpusave_len = 0;
|
||||||
*xfpusave = NULL;
|
*xfpusave = NULL;
|
||||||
|
|||||||
Reference in New Issue
Block a user