mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-28 20:05:38 +00:00
codecparsers: h264parser: guard against ref_pic_markings overflow
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1703>
This commit is contained in:
parent
3f8d33abed
commit
11353b3f6e
1 changed files with 7 additions and 3 deletions
|
@ -723,13 +723,17 @@ gst_h264_slice_parse_dec_ref_pic_marking (GstH264SliceHdr * slice,
|
|||
|
||||
dec_ref_pic_m->n_ref_pic_marking = 0;
|
||||
while (1) {
|
||||
refpicmarking =
|
||||
&dec_ref_pic_m->ref_pic_marking[dec_ref_pic_m->n_ref_pic_marking];
|
||||
|
||||
READ_UE (nr, mem_mgmt_ctrl_op);
|
||||
if (mem_mgmt_ctrl_op == 0)
|
||||
break;
|
||||
|
||||
if (dec_ref_pic_m->n_ref_pic_marking >=
|
||||
G_N_ELEMENTS (dec_ref_pic_m->ref_pic_marking))
|
||||
goto error;
|
||||
|
||||
refpicmarking =
|
||||
&dec_ref_pic_m->ref_pic_marking[dec_ref_pic_m->n_ref_pic_marking];
|
||||
|
||||
refpicmarking->memory_management_control_operation = mem_mgmt_ctrl_op;
|
||||
|
||||
if (mem_mgmt_ctrl_op == 1 || mem_mgmt_ctrl_op == 3)
|
||||
|
|
Loading…
Reference in a new issue