From 2443f2f954943839ff26b86d93f6121b17459c96 Mon Sep 17 00:00:00 2001 From: Payam Date: Mon, 31 Jan 2022 08:30:33 -0500 Subject: [PATCH] SWDEV-317141 - add param check for Graph Api for hipGraphExecMemsetNodeSetParams Change-Id: I748c7f273da08ace185bdee2b82fc0cd8584bdca [ROCm/clr commit: 724717752ee1271a1baa8f9a7e0a20779548dc65] --- projects/clr/hipamd/src/hip_graph.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/projects/clr/hipamd/src/hip_graph.cpp b/projects/clr/hipamd/src/hip_graph.cpp index 3f6c971521..ded252a55b 100644 --- a/projects/clr/hipamd/src/hip_graph.cpp +++ b/projects/clr/hipamd/src/hip_graph.cpp @@ -1034,7 +1034,11 @@ hipError_t hipGraphMemsetNodeSetParams(hipGraphNode_t node, const hipMemsetParam hipError_t hipGraphExecMemsetNodeSetParams(hipGraphExec_t hGraphExec, hipGraphNode_t node, const hipMemsetParams* pNodeParams) { HIP_INIT_API(hipGraphExecMemsetNodeSetParams, hGraphExec, node, pNodeParams); - if (hGraphExec == nullptr || node == nullptr || pNodeParams == nullptr) { + if (hGraphExec == nullptr || node == nullptr || pNodeParams == nullptr || + pNodeParams->dst == nullptr) { + HIP_RETURN(hipErrorInvalidValue); + } + if (ihipGraphMemsetParams_validate(pNodeParams) != hipSuccess) { HIP_RETURN(hipErrorInvalidValue); } hipGraphNode_t clonedNode = hGraphExec->GetClonedNode(node);