Skip to content

Commit

Permalink
[review] core: add tadb
Browse files Browse the repository at this point in the history
Signed-off-by: Jens Wiklander <[email protected]>
  • Loading branch information
jenswi-linaro committed Dec 1, 2017
1 parent 31b1621 commit bef845d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion core/tee/tadb.c
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,13 @@ static TEE_Result find_ent(struct tee_tadb_dir *db, const TEE_UUID *uuid,
TEE_Result res;
size_t idx;

/*
* Search for the provided uuid, if it's found return the index it
* has together with TEE_SUCCESS.
*
* If the uuid can't be found return the number indexes together
* with TEE_ERROR_ITEM_NOT_FOUND.
*/
for (idx = 0;; idx++) {
struct tadb_entry entry;

Expand Down Expand Up @@ -719,7 +726,7 @@ TEE_Result tee_tadb_ta_read(struct tee_tadb_ta_read *ta, void *buf, size_t *len)
return res;
} else {
size_t num_bytes = 0;
size_t b_size = MIN(SIZE_4K, l - num_bytes);
size_t b_size = MIN(SIZE_4K, l);
uint8_t *b = malloc(b_size);

if (!b)
Expand Down

0 comments on commit bef845d

Please sign in to comment.