Ensure that the supplied data length is large enough to hold the base
FPU state to avoid passing a negative length to fpusetregs() / npxsetregs(). Differential Revision: https://reviews.freebsd.org/D1861 Reviewed by: kib, emaste
This commit is contained in:
parent
9c633deb70
commit
8935302fe1
@ -88,7 +88,8 @@ cpu_ptrace_xstate(struct thread *td, int req, void *addr, int data)
|
||||
break;
|
||||
|
||||
case PT_SETXSTATE:
|
||||
if (data > cpu_max_ext_state_size) {
|
||||
if (data < sizeof(struct savefpu) ||
|
||||
data > cpu_max_ext_state_size) {
|
||||
error = EINVAL;
|
||||
break;
|
||||
}
|
||||
|
@ -92,7 +92,8 @@ cpu_ptrace_xstate(struct thread *td, int req, void *addr, int data)
|
||||
break;
|
||||
|
||||
case PT_SETXSTATE:
|
||||
if (data > cpu_max_ext_state_size) {
|
||||
if (data < sizeof(union savefpu) ||
|
||||
data > cpu_max_ext_state_size) {
|
||||
error = EINVAL;
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user