gsth264parser: reject memory management control op greater than 6

This prevents assertion from being thrown in
gst_h264_dpb_perform_memory_management_control_operation
if corrupt NAL has a control op greater than 6

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2508>
This commit is contained in:
Aaron Boxer 2021-09-03 14:57:09 -04:00 committed by GStreamer Marge Bot
parent 580ac55194
commit 15d724e671

View file

@ -723,7 +723,7 @@ gst_h264_slice_parse_dec_ref_pic_marking (GstH264SliceHdr * slice,
dec_ref_pic_m->n_ref_pic_marking = 0;
while (1) {
READ_UE (nr, mem_mgmt_ctrl_op);
READ_UE_MAX (nr, mem_mgmt_ctrl_op, 6);
if (mem_mgmt_ctrl_op == 0)
break;