freebsd-dev/sys/contrib/libnv
Stefan Grundmann e673ac3ffb libnv: Fix array unpack endianness logic
When a nvlist(9) is converted into a binary buffer by nvlist_pack(9),
the host endianness is encoded in the nvlist_header of the binary
buffer. The nvlist_unpack(9) function converts a given binary buffer
to an nvlist. In the conversion process the endianness encoded in the
nvlist_header is evaluated and -- should the encoded endianness differ
from the endianess of the decoding host -- endianness conversion is
applied to nvlist_header and nvpair_header elements as well as
to some nvpair values.

In 2015 @oshogbo extended libnv with array support (in 347a39b).
The unpacking code misses the possible need to convert the endianness
of the nvph_nitems element of nvpair_headers.

The patch (re)enables libnv to unpack nvlists regardless of the
endianness of the packing host.

Pull Request:	https://github.com/freebsd/freebsd-src/pull/528
2021-09-13 21:21:14 +02:00
..
bsd_nvpair.c libnv: Fix array unpack endianness logic 2021-09-13 21:21:14 +02:00
cnvlist.c
dnvlist.c Remove "All Rights Reserved" from FreeBSD Foundation sys/ copyrights 2021-08-08 10:42:24 -04:00
nv_impl.h libnv: Allow use in non-sleepable contexts 2021-04-07 15:54:10 +02:00
nvlist_impl.h
nvlist.c libnv: optimize nvlist size calculation 2021-06-11 17:51:29 +02:00
nvpair_impl.h