Commit 6587e924 authored by Justin Kim's avatar Justin Kim Committed by Sebastian Dröge

h265parser: prevent to overrun chroma_weight_l0_flag

The index of elements cannot exceed or equal to the size of elements.

https://bugzilla.gnome.org/show_bug.cgi?id=722101
parent d1877b0b
......@@ -1173,7 +1173,7 @@ gst_h265_slice_parse_pred_weight_table (GstH265SliceHdr * slice, NalReader * nr)
READ_UE_ALLOWED (nr, p->luma_log2_weight_denom, 0, 7);
/* set default values */
for (i = 0; i <= G_N_ELEMENTS (p->chroma_weight_l0_flag); i++) {
for (i = 0; i < G_N_ELEMENTS (p->chroma_weight_l0_flag); i++) {
p->chroma_weight_l0_flag[i] = 0;
p->luma_offset_l0[i] = 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment