Message ID | 20201026220339.195790-3-laurent@vivier.eu |
---|---|
State | New |
Headers | show |
Series | [PULL,1/8] Fix stack smashing when handling PR_GET_PDEATHSIG | expand |
diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 3e0f14f2e67f..cd520ae42e6d 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -9787,6 +9787,11 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, __put_user(stfs.f_fsid.__val[1], &target_stfs->f_fsid.val[1]); __put_user(stfs.f_namelen, &target_stfs->f_namelen); __put_user(stfs.f_frsize, &target_stfs->f_frsize); +#ifdef _STATFS_F_FLAGS + __put_user(stfs.f_flags, &target_stfs->f_flags); +#else + __put_user(0, &target_stfs->f_flags); +#endif memset(target_stfs->f_spare, 0, sizeof(target_stfs->f_spare)); unlock_user_struct(target_stfs, arg3, 1); }