mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 10:11:08 +00:00
vc1parser: do not overwrite buffer
I do not know the bitstream format, but this seems likely to be what was intended. Also add a check on the number of items to read. https://bugzilla.gnome.org/show_bug.cgi?id=662776
This commit is contained in:
parent
32a1e05795
commit
ca2f96caac
1 changed files with 9 additions and 1 deletions
|
@ -1985,8 +1985,16 @@ gst_vc1_parse_entry_point_header (const guint8 * data, gsize size,
|
|||
entrypoint->quantizer = gst_bit_reader_get_bits_uint8_unchecked (&br, 2);
|
||||
|
||||
if (advanced->hrd_param_flag) {
|
||||
if (seqhdr->advanced.hrd_param.hrd_num_leaky_buckets >
|
||||
MAX_HRD_NUM_LEAKY_BUCKETS) {
|
||||
GST_WARNING
|
||||
("hrd_num_leaky_buckets (%d) > MAX_HRD_NUM_LEAKY_BUCKETS (%d)",
|
||||
seqhdr->advanced.hrd_param.hrd_num_leaky_buckets,
|
||||
MAX_HRD_NUM_LEAKY_BUCKETS);
|
||||
goto failed;
|
||||
}
|
||||
for (i = 0; i < seqhdr->advanced.hrd_param.hrd_num_leaky_buckets; i++)
|
||||
READ_UINT8 (&br, entrypoint->hrd_full[MAX_HRD_NUM_LEAKY_BUCKETS], 8);
|
||||
READ_UINT8 (&br, entrypoint->hrd_full[i], 8);
|
||||
}
|
||||
|
||||
READ_UINT8 (&br, entrypoint->coded_size_flag, 1);
|
||||
|
|
Loading…
Reference in a new issue