Don't set parent if the unpack operation fail. In some
case this could crash the library, because of the NULL pointer references. Discovered thanks to american fuzzy lop. Approved by: pjd (mentor)
This commit is contained in:
parent
d99337805f
commit
51dae13f0e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=286644
@ -824,6 +824,8 @@ nvlist_xunpack(const void *buf, size_t size, const int *fds, size_t nfds,
|
||||
case NV_TYPE_NVLIST:
|
||||
ptr = nvpair_unpack_nvlist(isbe, nvp, ptr, &left, nfds,
|
||||
&tmpnvl);
|
||||
if (tmpnvl == NULL || ptr == NULL)
|
||||
goto failed;
|
||||
nvlist_set_parent(tmpnvl, nvp);
|
||||
break;
|
||||
#ifndef _KERNEL
|
||||
|
Loading…
Reference in New Issue
Block a user