libnv: correct the calculation of the structure's size
Reported by: Milosz Kaniewski <milosz.kaniewski@gmail.com>
Approved by: so
Approved by: re (cperciva)
Security: FreeBSD-SA-24:16.libnv
Security: CVE-2024-45287
(cherry picked from commit 7f4731ab67f1d3345aee6626eb83cc5ce00010f0)
(cherry picked from commit 056c50c48be3e3828ef740d2fcce988a545e52aa)
(cherry picked from commit d84fced6b468a637b5a47bad747730fa344d68d8)