On 4 August 2014 17:45, Tom Musta <tommu...@gmail.com> wrote: > Properly detect a fault when attempting to store into an invalid > struct timespec pointer. > > Signed-off-by: Tom Musta <tommu...@gmail.com> > > diff --git a/linux-user/syscall.c b/linux-user/syscall.c > index 5f193cd..95cee0b 100644 > --- a/linux-user/syscall.c > +++ b/linux-user/syscall.c > @@ -7754,7 +7754,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long > arg1, > struct timespec ts; > ret = get_errno(sched_rr_get_interval(arg1, &ts)); > if (!is_error(ret)) { > - host_to_target_timespec(arg2, &ts); > + ret = host_to_target_timespec(arg2, &ts); > } > } > break;
Reviewed-by: Peter Maydell <peter.mayd...@linaro.org> A quick grep suggests there may well be other callsites that should be checking the host_to_target_timespec() return value as well... thanks -- PMM