From a87342e8499ed276cad9f7d96dc4d56d12cc3c5f Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Fri, 11 Mar 2016 22:37:12 +0000 Subject: [PATCH] libelf: correct byte count in cross-endian note translation MFC after: 1 month Sponsored by: The FreeBSD Foundation --- contrib/elftoolchain/libelf/libelf_convert.m4 | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/elftoolchain/libelf/libelf_convert.m4 b/contrib/elftoolchain/libelf/libelf_convert.m4 index 9f99f1ead86..0eddbe7c76b 100644 --- a/contrib/elftoolchain/libelf/libelf_convert.m4 +++ b/contrib/elftoolchain/libelf/libelf_convert.m4 @@ -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;