]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
bfd_mmap_local: Check offset and size
authorH.J. Lu <hjl.tools@gmail.com>
Thu, 4 Apr 2024 13:37:18 +0000 (06:37 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Thu, 4 Apr 2024 22:35:48 +0000 (15:35 -0700)
commit0ffdc37b98964477e70bfd63ca28f374193dcdb2
treef45a262c03413092c89a8735f34f73a064c36e65
parent360d244b24e84c50f2c6054908cfafb370a1f13c
bfd_mmap_local: Check offset and size

Update bfd_mmap_local to return NULL if filesize < offset or filesize -
offset < rsize.

* libbfd.c (bfd_mmap_local): Validate offset and size against
the file size.
bfd/libbfd.c