mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 10:11:08 +00:00
d3d11h265dec: Fix possible invalid memory access
The number of element to copy should be num_tile_columns_minus1 and num_tile_rows_minus1. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1374>
This commit is contained in:
parent
48ca7c7e93
commit
117f593cff
1 changed files with 4 additions and 2 deletions
|
@ -958,10 +958,12 @@ gst_d3d11_h265_dec_picture_params_from_pps (GstD3D11H265Dec * self,
|
|||
COPY_FIELD (num_tile_columns_minus1);
|
||||
COPY_FIELD (num_tile_rows_minus1);
|
||||
if (!pps->uniform_spacing_flag) {
|
||||
for (i = 0; i < pps->num_tile_columns_minus1 + 1; i++)
|
||||
for (i = 0; i < pps->num_tile_columns_minus1 &&
|
||||
i < G_N_ELEMENTS (params->column_width_minus1); i++)
|
||||
COPY_FIELD (column_width_minus1[i]);
|
||||
|
||||
for (i = 0; i < pps->num_tile_rows_minus1 + 1; i++)
|
||||
for (i = 0; i < pps->num_tile_rows_minus1 &&
|
||||
i < G_N_ELEMENTS (params->row_height_minus1); i++)
|
||||
COPY_FIELD (row_height_minus1[i]);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue