From 938fb7703e7f869ae54931cc5556a27993ef322a Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Thu, 13 Nov 2025 13:53:58 -0800 Subject: [PATCH] anv/video: Cast intentional read past end of struct member to void* Coverity notices that we read past the end of the array we're pointing to, which is intentional, we want to copy additional members from the source struct into the target pointer. As such, cast to a `void *`, since this will make Coverity happy. CID: 1649589 Fixes: 314de7af063 ("anv: Initial support for VP9 decoding") Reviewed-by: Hyunjun Ko Part-of: --- src/intel/vulkan/anv_video.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/intel/vulkan/anv_video.c b/src/intel/vulkan/anv_video.c index 9f6523ef339..ec70a0e4170 100644 --- a/src/intel/vulkan/anv_video.c +++ b/src/intel/vulkan/anv_video.c @@ -1262,7 +1262,8 @@ vp9_prob_buf_update(struct anv_video_session *vid, VP9_CTX_DEFAULT(uv_mode_probs); } - memcpy(ptr + INTER_MODE_PROBS_OFFSET, &ctx.inter_mode_probs, INTER_MODE_PROBS_SIZE); + memcpy(ptr + INTER_MODE_PROBS_OFFSET, (void *)&ctx.inter_mode_probs, + INTER_MODE_PROBS_SIZE); } /* Copy seg probs */