From bc088b14ebe8e875e5f02926f5f24867dc0ab746 Mon Sep 17 00:00:00 2001 From: Juergen Repp Date: Tue, 30 Jan 2024 14:36:32 +0100 Subject: [PATCH] FAPI: Fix possible null pointer dereferencing in Fapi_List. The possible null pointer dereferencing if Fapi_List_Finish is called without previous call of the async function is fixed. Signed-off-by: Juergen Repp --- src/tss2-fapi/api/Fapi_List.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tss2-fapi/api/Fapi_List.c b/src/tss2-fapi/api/Fapi_List.c index c2dc21bc2..dbf5d52ca 100644 --- a/src/tss2-fapi/api/Fapi_List.c +++ b/src/tss2-fapi/api/Fapi_List.c @@ -183,6 +183,8 @@ Fapi_List_Finish( /* Helpful alias pointers */ IFAPI_Entities_List * command = &context->cmd.Entities_List; + check_not_null(command->searchPath); + /* Retrieve the objects along the search path. */ r = ifapi_keystore_list_all(&context->keystore, command->searchPath, &pathArray, &numPaths);