]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
libsa: Fix a bug in nvlist creation
authorMark Johnston <markj@FreeBSD.org>
Fri, 20 May 2022 14:15:00 +0000 (10:15 -0400)
committerMark Johnston <markj@FreeBSD.org>
Fri, 27 May 2022 13:14:58 +0000 (09:14 -0400)
commitf2206d2f94a42f925db350a2bbab52091368ef95
tree26aa6b6b2a70518965c058eaea63d8a50ac139d2
parenta3113db1024d159157fc2e4f0aa31fd4f96b2db1
libsa: Fix a bug in nvlist creation

When adding an entry to an nvlist, the data buffer might need to be
resized.  When this happens, the XDR encoder's notion of the buffer size
also needs to be updated, otherwise the operation may erroneously fail.

Reviewed by: tsoome, imp
Sponsored by: The FreeBSD Foundation

(cherry picked from commit bcc3148c70c72cc409881e7a25e2bb053a39a0da)
stand/libsa/zfs/nvlist.c