mirror of
https://xff.cz/git/u-boot/
synced 2025-09-28 22:11:16 +02:00
tee: optee: fix uuid comparisons on service discovery
When comparing UUIDs for discovered services we only compare up to the
ptr size instead of the entire UUID
Fixes: 94ccfb78a4
("drivers: tee: optee: discover OP-TEE services")
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
This commit is contained in:
@@ -73,7 +73,7 @@ static struct optee_service *find_service_driver(const struct tee_optee_ta_uuid
|
|||||||
|
|
||||||
for (idx = 0; idx < service_cnt; idx++, service++) {
|
for (idx = 0; idx < service_cnt; idx++, service++) {
|
||||||
tee_optee_ta_uuid_to_octets(loc_uuid, &service->uuid);
|
tee_optee_ta_uuid_to_octets(loc_uuid, &service->uuid);
|
||||||
if (!memcmp(uuid, loc_uuid, sizeof(uuid)))
|
if (!memcmp(uuid, loc_uuid, sizeof(*uuid)))
|
||||||
return service;
|
return service;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user