mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 09:10:28 +00:00
:nvlist_unpack__duplicate_key : check the result of nvlist_pack(3)
This fixes a potential NULL pointer dereference. MFC after: 3 days Reported by: Coverity CID: 1362051 Sponsored by: Dell EMC Isilon
This commit is contained in:
parent
2c6778ed5b
commit
6399b5e03a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=319156
|
@ -640,6 +640,7 @@ ATF_TEST_CASE_BODY(nvlist_unpack__duplicate_key)
|
|||
nvlist_add_number(nvl, key2, 10);
|
||||
|
||||
packed = nvlist_pack(nvl, &size);
|
||||
ATF_REQUIRE(packed != NULL);
|
||||
|
||||
/*
|
||||
* Mangle the packed nvlist by replacing key1 with key2, creating a
|
||||
|
|
Loading…
Reference in a new issue