Skip to content
Commit c0c92538 authored by Ruchika Gupta's avatar Ruchika Gupta Committed by Jérôme Forissier
Browse files

libteec: Handle NULL pointer when using TEEC_TempMemoryReference



If TEE or TEE driver doesn't support the capability
"TEE_GEN_CAP_MEMREF_NULL", it can't handle NULL pointers.

The cases where NULL pointer is passed with size 0 as
TEEC_TempMemoryReference parameter is a valid use case and should
not return error. In such cases, use TEEC_AllocateSharedMemory()
instead of TEEC_RegisterSharedMemory() to allocate a block of shared
memory.

Reviewed-by: Jens Wiklander's avatarJens Wiklander <jens.wiklander@linaro.org>
Acked-by: default avatarEtienne Carriere <etienne.carriere@linaro.org>
Signed-off-by: default avatarRuchika Gupta <ruchika.gupta@linaro.org>
parent 2de7f253
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment