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: 314de7af06 ("anv: Initial support for VP9 decoding")
Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38438>
This commit is contained in:
Dylan Baker 2025-11-13 13:53:58 -08:00 committed by Marge Bot
parent c9bc373f7c
commit 938fb7703e

View file

@ -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 */