mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-28 20:05:38 +00:00
mpegvideoparse: check width/height range
Checks if the width/height that are to be set on src pad caps are within valid range of [16,4096]
This commit is contained in:
parent
8db2821791
commit
1069712438
1 changed files with 7 additions and 0 deletions
|
@ -243,6 +243,13 @@ mpegvideoparse_handle_sequence (MpegVideoParse * mpegvideoparse,
|
|||
if (G_UNLIKELY (!mpeg_util_parse_sequence_hdr (&new_hdr, cur, end)))
|
||||
return FALSE;
|
||||
|
||||
if (new_hdr.width < 16 || new_hdr.width > 4096 ||
|
||||
new_hdr.height < 16 || new_hdr.height > 4096) {
|
||||
GST_WARNING_OBJECT (mpegvideoparse, "Width/height out of valid range "
|
||||
"[16, 4096]");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (memcmp (&mpegvideoparse->seq_hdr, &new_hdr, sizeof (MPEGSeqHdr)) != 0) {
|
||||
GstCaps *caps;
|
||||
GstBuffer *seq_buf;
|
||||
|
|
Loading…
Reference in a new issue