mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 15:38:09 +02:00
virgl/video: Fix out-of-bounds access in fill_mpeg4_picture_desc()
An out-of-bounds access has occurred to array ref[2] and it needs to be fixed. Fixes:6b5aecb195("virgl: add support for hardware video acceleration") Signed-off-by: Feng Jiang <jiangfeng@kylinos.cn> Reviewed-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23160> (cherry picked from commit5c2f6d3f8e)
This commit is contained in:
parent
7286bc0d4b
commit
70e19345a5
2 changed files with 2 additions and 2 deletions
|
|
@ -1867,7 +1867,7 @@
|
|||
"description": "virgl/video: Fix out-of-bounds access in fill_mpeg4_picture_desc()",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "6b5aecb19558200fd39fda46db08456ba7acc180"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -551,7 +551,7 @@ static int fill_mpeg4_picture_desc(const struct pipe_picture_desc *desc,
|
|||
ITEM_SET(vmpeg4, mpeg4, top_field_first);
|
||||
ITEM_CPY(vmpeg4, mpeg4, intra_matrix);
|
||||
ITEM_CPY(vmpeg4, mpeg4, non_intra_matrix);
|
||||
for (i = 0; i < 16; i++) {
|
||||
for (i = 0; i < ARRAY_SIZE(mpeg4->ref); i++) {
|
||||
vbuf = virgl_video_buffer(mpeg4->ref[i]);
|
||||
vmpeg4->ref[i] = vbuf ? vbuf->handle : 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue