x32/FD: Make use of SanitizeIOCount for vector construction in vmsplice

Makes this consistent with the other fd syscalls that make temporary
buffers.
This commit is contained in:
LC committed 2026-07-12 13:01:58 -04:00
1 parent bc16f902d1
commit 046750354e
1 file changed
+1 -1
@@ -857,7 +857,7 @@ void RegisterFD(FEX::HLE::SyscallHandler* Handler) {
REGISTER_SYSCALL_IMPL_X32(
vmsplice, [](FEXCore::Core::CpuStateFrame* Frame, int fd, const struct iovec32* iov, unsigned long nr_segs, unsigned int flags) -> uint64_t {
FaultSafeUserMemAccess::VerifyIsReadable(iov, sizeof(struct iovec32) * SanitizeIOCount(nr_segs));
fextl::vector<iovec> Host_iovec(iov, iov + nr_segs);
fextl::vector<iovec> Host_iovec(iov, iov + SanitizeIOCount(nr_segs));
uint64_t Result = ::vmsplice(fd, Host_iovec.data(), nr_segs, flags);
SYSCALL_ERRNO();
});