: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
d38aff03e1
commit
f5961d3ce5
@ -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