]> git.ipfire.org Git - thirdparty/systemd.git/commit
mmap-cache: check offset and size more carefully
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 18 Oct 2023 04:49:14 +0000 (13:49 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 19 Oct 2023 09:31:44 +0000 (18:31 +0900)
commitc886f2d26e17cbe2106571a100ac34543ef3007e
tree8beee7fc939f3256d808363e0dd8fcb684d0c3c4
parentffee7b97e3009d7d7370c80da42af766cc718c72
mmap-cache: check offset and size more carefully

PAGE_ALIGN() and friends take size_t, while offset is uint64_t.
Let's use macros for uint64_t.

Also, mmap() takes size_t for size. So, let's also use size_t to
calculate a window size.

Prompted by CID#1491286.
src/libsystemd/sd-journal/mmap-cache.c