libelf: correct byte count in cross-endian note translation

MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Ed Maste 2016-03-11 22:37:12 +00:00
parent 6078c8e049
commit a87342e849
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=296685

View File

@ -1019,6 +1019,7 @@ _libelf_cvt_NOTE_tof(unsigned char *dst, size_t dsz, unsigned char *src,
WRITE_WORD(dst, type);
src += sizeof(Elf_Note);
count -= sizeof(Elf_Note);
if (count < sz)
sz = count;