mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 00:32:04 +02:00
common: avb_verify: prevent opening incorrect session
The arg->session is not valid if arg->ret != NULL, so can't be assigned, correct this. Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@globallogic.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
This commit is contained in:
committed by
Tom Rini
parent
aa0a8a0be2
commit
3106e47524
@@ -619,11 +619,12 @@ static int get_open_session(struct AvbOpsData *ops_data)
|
||||
memset(&arg, 0, sizeof(arg));
|
||||
tee_optee_ta_uuid_to_octets(arg.uuid, &uuid);
|
||||
rc = tee_open_session(tee, &arg, 0, NULL);
|
||||
if (!rc) {
|
||||
if (rc || arg.ret)
|
||||
continue;
|
||||
|
||||
ops_data->tee = tee;
|
||||
ops_data->session = arg.session;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user