Searched hist:ee2f75af753f876e5602064925ec79ef05b9d60b (Results 1 – 1 of 1) sorted by relevance
| /optee_os/lib/libutee/ |
| H A D | tee_api_operations.c | ee2f75af753f876e5602064925ec79ef05b9d60b Wed Sep 09 21:09:53 UTC 2020 Jens Wiklander <jens.wiklander@linaro.org> libutee: fix TEE_GetOperationInfoMultiple()
The size parameter passed to TEE_GetOperationInfoMultiple() tells the size of the op_info buffer. The maximum number of keys which can be contained in the struct can be calculated from this size parameter.
Prior to this patch is was assumed that the caller by this specified the exact number of keys to report. This is not correct as the size parameter is only the upper limit. Fix this by instead figuring out how many keys (one or two) needs to be returned and after that check if the buffer is large enough.
Fixes: 05304565f188 ("GP11 : TEE_GetOperationInfoMultiple") Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
|