Skip to content

Commit 761210f

Browse files
jiaxli-QCJiaxing Li
authored andcommitted
Fix a casting error during compiling qcomtee library
Encountered int-to-pointer-cast error when compiles the qcomtee library due to casting error. Resolve the compilation error by ensuring the integer-to-pointer conversision is safe for all architectures. Signed-off-by: Jiaxing Li <[email protected]>
1 parent e20d638 commit 761210f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libqcomtee/src/qcomtee_object.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ static int qcomtee_object_cb_marshal_in(struct qcomtee_param *params,
571571
switch (tee_params[i].attr) {
572572
case TEE_IOCTL_PARAM_ATTR_TYPE_UBUF_INPUT:
573573
case TEE_IOCTL_PARAM_ATTR_TYPE_UBUF_OUTPUT:
574-
params[i].ubuf.addr = (void *)tee_params[i].a;
574+
params[i].ubuf.addr = (void *)(uintptr_t)(tee_params[i].a);
575575
params[i].ubuf.size = (size_t)tee_params[i].b;
576576
params[i].attr =
577577
(tee_params[i].attr ==

0 commit comments

Comments
 (0)