mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-29 16:44:03 +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 New Issue
Block a user