pkcs11-spy: Fix C_GetFunctionList() crash with NULL argument

In real world ppFunctionList=NULL case is only used by PKCS#11 test suites but
no need to crash them.

Signed-off-by: Vesa Jääskeläinen <vesa.jaaskelainen@vaisala.com>
This commit is contained in:
Vesa Jääskeläinen 2021-08-04 16:32:43 +03:00 committed by Jakub Jelen
parent 7007eda0ba
commit 1b344a4847
1 changed files with 2 additions and 0 deletions

View File

@ -531,6 +531,8 @@ CK_RV C_GetFunctionList
}
enter("C_GetFunctionList");
if (ppFunctionList == NULL)
return retne(CKR_ARGUMENTS_BAD);
*ppFunctionList = pkcs11_spy;
return retne(CKR_OK);
}