From 140e744f4b12e7aeef5f142f78f8017feba0d533 Mon Sep 17 00:00:00 2001 From: "Wrobel, Patryk" Date: Wed, 3 Aug 2022 23:26:15 +0000 Subject: [PATCH] Improve safety of pattern reading in appendMemoryFill() Related-To: NEO-7233 Signed-off-by: Wrobel, Patryk --- level_zero/core/source/cmdlist/cmdlist_hw.inl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/level_zero/core/source/cmdlist/cmdlist_hw.inl b/level_zero/core/source/cmdlist/cmdlist_hw.inl index 1b8d42b16a..5dda319a26 100644 --- a/level_zero/core/source/cmdlist/cmdlist_hw.inl +++ b/level_zero/core/source/cmdlist/cmdlist_hw.inl @@ -1541,7 +1541,7 @@ ze_result_t CommandListCoreFamily::appendMemoryFill(void *ptr, return ZE_RESULT_ERROR_UNKNOWN; } - uint32_t value = *(reinterpret_cast(const_cast(pattern))); + uint32_t value = *(reinterpret_cast(pattern)); builtinFunction->setArgBufferWithAlloc(0, dstAllocation.alignedAllocationPtr, dstAllocation.alloc); builtinFunction->setArgumentValue(1, sizeof(dstAllocation.offset), &dstAllocation.offset); builtinFunction->setArgumentValue(2, sizeof(value), &value);