]> git.ipfire.org Git - thirdparty/qemu.git/commit
linux-user: Widen target_mmap offset argument to off_t
authorRichard Henderson <richard.henderson@linaro.org>
Fri, 7 Jul 2023 20:40:41 +0000 (21:40 +0100)
committerRichard Henderson <richard.henderson@linaro.org>
Sat, 15 Jul 2023 07:02:32 +0000 (08:02 +0100)
commit55baec0f4c535e24a060070592b8c51d75108481
tree6a807cbafc3928642e00e1d0c5ea1faa0d23cb17
parent0dd558121c41dd4578517a90668c24e7fcdd46ba
linux-user: Widen target_mmap offset argument to off_t

We build with _FILE_OFFSET_BITS=64, so off_t = off64_t = uint64_t.
With an extra cast, this fixes emulation of mmap2, which could
overflow the computation of the full value of offset.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230707204054.8792-14-richard.henderson@linaro.org>
linux-user/mmap.c
linux-user/syscall.c
linux-user/user-mmap.h