Skip to content

Commit c4cf527

Browse files
committed
add null check for pipe_ptr
1 parent 534cafc commit c4cf527

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/acl_kernel.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,9 @@ CL_API_ENTRY cl_int CL_API_CALL clSetKernelArgIntelFPGA(cl_kernel kernel,
436436
// shouldn't spend time setting up the argument properly.
437437
if (is_pipe) {
438438
cl_mem pipe_ptr = *((cl_mem *)arg_value);
439+
if (pipe_ptr == 0) {
440+
ERR_RET(CL_INVALID_ARG_VALUE, context, "Pipe value is NULL");
441+
}
439442

440443
kernel->arg_is_svm[arg_index] = CL_FALSE;
441444
kernel->arg_is_ptr[arg_index] = CL_FALSE;

0 commit comments

Comments
 (0)