Le 01/10/2021 à 17:33, Richard Henderson a écrit :
> Do not cast the signal mask elements; trust __put_user.
> 
> Signed-off-by: Richard Henderson <richard.hender...@linaro.org>
> ---
>  linux-user/nios2/signal.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/linux-user/nios2/signal.c b/linux-user/nios2/signal.c
> index 20b65aa06e..80e3d42fc9 100644
> --- a/linux-user/nios2/signal.c
> +++ b/linux-user/nios2/signal.c
> @@ -168,8 +168,7 @@ void setup_rt_frame(int sig, struct target_sigaction *ka,
>      target_save_altstack(&frame->uc.tuc_stack, env);
>      rt_setup_ucontext(&frame->uc, env);
>      for (i = 0; i < TARGET_NSIG_WORDS; i++) {
> -        __put_user((abi_ulong)set->sig[i],
> -                   (abi_ulong *)&frame->uc.tuc_sigmask.sig[i]);
> +        __put_user(set->sig[i], &frame->uc.tuc_sigmask.sig[i]);
>      }
>  
>      /* Set up to return from userspace; jump to fixed address sigreturn
> 

Reviewed-by: Laurent Vivier <laur...@vivier.eu>

Reply via email to