summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2003-05-08 16:30:52 +0000
committermillert <millert@openbsd.org>2003-05-08 16:30:52 +0000
commitabf784ab70b12f8d5b1c409de8c27b8cb7494d05 (patch)
treebdaa1a32ef04d69f207c14d09b8ed53f47f3d0fb /lib/libc
parentKNF (diff)
downloadwireguard-openbsd-abf784ab70b12f8d5b1c409de8c27b8cb7494d05.tar.xz
wireguard-openbsd-abf784ab70b12f8d5b1c409de8c27b8cb7494d05.zip
Previously, ld.so would use a single page for mapping the hints file
and then, if that was not big enough, map the rest of it contiguously. However, there is no guarantee that the address space after the first mmap has not already been used by something else. Instead, just fstat the file and map up to st_size. Also reorganized the code a tad and added some sanity checks for st_size. Problem tracked down by dhartmei@ and mickey@; drahn@ OK.
Diffstat (limited to 'lib/libc')
0 files changed, 0 insertions, 0 deletions