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:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user