HomeFreeBSD

libelf: Fix cross-endian ELF note file / memory conversion

Description

libelf: Fix cross-endian ELF note file / memory conversion

The namesz and descsz variables need to be used in native endianness.
The sizes are in native order after swapping in the file to memory case,
and before swapping in the memory to file case.

This issue was identified for r273443, but the change was applied to the
wrong case. Revert r273443 to fix the to-memory case, and apply the
equivalent change to the to-file case.

Sponsored by: DARPA, AFRL
Reviewed by: adrian, brooks, marcel
Differential Revision: https://reviews.freebsd.org/D1257

Details

Provenance
emasteAuthored on
Reviewer
adrian
Differential Revision
D1257: Fix cross-endian ELF note file / memory conversion
Parents
rS275429: MFC r274821:
Branches
Unknown
Tags
Unknown

Event Timeline