Message ID | 20180219171037.24539-4-laurent@vivier.eu |
---|---|
State | New |
Headers | show |
Series | [PULL,1/8] linux-user: Implement ioctl cmd TIOCGPTPEER | expand |
diff --git a/linux-user/syscall.c b/linux-user/syscall.c index effc3a0881..e24f43c4a2 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -10502,7 +10502,9 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, ret = arg2; } - ret = host_to_target_cpu_mask(mask, mask_size, arg3, arg2); + if (host_to_target_cpu_mask(mask, mask_size, arg3, ret)) { + goto efault; + } } } break;