aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2024-03-19 00:01:23 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2024-03-19 00:01:23 +0000
commit785600d0fb13d6f0b4595bf4dbbc048113dda71d (patch)
tree68c839c536cd14a516cc2525f31f1caf010f10d3 /cmd
parenta8eb3b365eb63d2a569b166f2dfc982967d3a7fa (diff)
downloadsrc-main.tar.gz
src-main.zip
kldxref: Properly handle reading strings near the end of an ELF fileHEADmain
If a string is at or near the end of an input file and the amount of remaining data in the file is smaller than the maximum string size, the pread(2) system call would return a short read which is treated as an error. Instead, add a new helper function for reading a string which permits short reads so long as the data read from the file contains a terminated string. Reported by: jrtc27 Reviewed by: jrtc27 Sponsored by: University of Cambridge, Google, Inc. Differential Revision: https://reviews.freebsd.org/D44419
Diffstat (limited to 'cmd')
0 files changed, 0 insertions, 0 deletions