summaryrefslogtreecommitdiff
path: root/core/tee/tee_svc_storage.c
diff options
context:
space:
mode:
Diffstat (limited to 'core/tee/tee_svc_storage.c')
-rw-r--r--core/tee/tee_svc_storage.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/tee/tee_svc_storage.c b/core/tee/tee_svc_storage.c
index 5602504a..d6418ec5 100644
--- a/core/tee/tee_svc_storage.c
+++ b/core/tee/tee_svc_storage.c
@@ -463,6 +463,11 @@ TEE_Result syscall_storage_obj_create(unsigned long storage_id, void *object_id,
&attr_o);
if (res != TEE_SUCCESS)
goto err;
+ /* The supplied handle must be one of an initialized object */
+ if (!(attr_o->info.handleFlags & TEE_HANDLE_FLAG_INITIALIZED)) {
+ res = TEE_ERROR_BAD_PARAMETERS;
+ goto err;
+ }
}
res = tee_svc_storage_init_file(o, attr_o, data, len);