summaryrefslogtreecommitdiffstats
path: root/src/network/meson.build
diff options
context:
space:
mode:
authorTobias Stoeckmann <tobias@stoeckmann.org>2022-03-02 22:03:26 +0100
committerLennart Poettering <lennart@poettering.net>2022-03-03 22:48:43 +0100
commit1a823cdeb9faea3849843e0b3dae0fbdd607e8b7 (patch)
treee7e6f91ec7e59db9d0b07edcb5d3d3c98ca21420 /src/network/meson.build
parentkillall: show PID of processes killed in final killing spree (diff)
downloadsystemd-1a823cdeb9faea3849843e0b3dae0fbdd607e8b7.tar.xz
systemd-1a823cdeb9faea3849843e0b3dae0fbdd607e8b7.zip
core: check size before mmap
The data type off_t can be 64 on 32 bit systems if they have large file support. Since mmap expects a size_t with 32 bits as second argument truncation could occur. At worst these huge files could lead to mmaps smaller than the previous check for small files. This in turn shouldn't have a lot of impact because mmap allocates at page size boundaries. This also made the PAGE_ALIGN call in open_mmap unneeded. In fact it was neither in sync with other mmap calls nor with its own munmap counterpart in error path. If such large files are encountered, which is very unlikely in these code paths, treat them with the same error as if they are too small.
Diffstat (limited to 'src/network/meson.build')
0 files changed, 0 insertions, 0 deletions