mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 09:13:55 -06:00
linux-user: Detect fault in sched_rr_get_interval
Properly detect a fault when attempting to store into an invalid struct timespec pointer. Signed-off-by: Tom Musta <tommusta@gmail.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
This commit is contained in:
parent
a1d5c5b25d
commit
d4290c40a4
1 changed files with 1 additions and 1 deletions
|
@ -7794,7 +7794,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
|
||||||
struct timespec ts;
|
struct timespec ts;
|
||||||
ret = get_errno(sched_rr_get_interval(arg1, &ts));
|
ret = get_errno(sched_rr_get_interval(arg1, &ts));
|
||||||
if (!is_error(ret)) {
|
if (!is_error(ret)) {
|
||||||
host_to_target_timespec(arg2, &ts);
|
ret = host_to_target_timespec(arg2, &ts);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue