Skip to content

Commit

Permalink
libffi: Fix handling of pulCount parameter of C_GetInterfaceList
Browse files Browse the repository at this point in the history
When C_GetInterfaceList is called with NULL pInterfaceList, It doesn't
make any sense to check the content of pulCount.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
  • Loading branch information
ueno committed May 9, 2023
1 parent e5a62d8 commit 990bd5a
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions p11-kit/virtual.c
Original file line number Diff line number Diff line change
Expand Up @@ -985,10 +985,7 @@ binding_C_GetInterfaceList (ffi_cif *cif,
}

if (interface_list == NULL) {
if (*count < NUM_INTERFACES)
*ret = CKR_BUFFER_TOO_SMALL;
else
*ret = CKR_OK;
*ret = CKR_OK;
*count = NUM_INTERFACES;
return;
}
Expand Down

0 comments on commit 990bd5a

Please sign in to comment.