Skip to content

Commit 491d948

Browse files
committed
removed possibility of deferencing nullptr arg_value in src/acl_kernel
1 parent 79228be commit 491d948

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/acl_kernel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ CL_API_ENTRY cl_int CL_API_CALL clSetKernelArgIntelFPGA(cl_kernel kernel,
419419
ERR_RET(CL_INVALID_ARG_SIZE, context,
420420
"Argument size is the wrong size");
421421
}
422-
} else if (arg_size == sizeof(cl_mem) &&
422+
} else if (arg_size == sizeof(cl_mem) && arg_value!=NULL &&
423423
acl_pipe_is_valid_pointer(*((cl_mem *)arg_value), kernel)) {
424424
is_pipe = CL_TRUE;
425425
} else if (arg_size != arg_info->size) {

0 commit comments

Comments
 (0)