mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-04 21:42:25 +00:00
Make sure buffer is long enough in type_find. Attempt to fix #114580
Original commit message from CVS: Make sure buffer is long enough in type_find. Attempt to fix #114580
This commit is contained in:
parent
dbf13a6d53
commit
2d14fa98cb
1 changed files with 4 additions and 0 deletions
|
@ -114,6 +114,10 @@ flxdec_type_find (GstBuffer *buf, gpointer private)
|
||||||
guchar *data = GST_BUFFER_DATA(buf);
|
guchar *data = GST_BUFFER_DATA(buf);
|
||||||
GstCaps *new;
|
GstCaps *new;
|
||||||
|
|
||||||
|
if(GST_BUFFER_SIZE(buf) < 134){
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
/* check magic */
|
/* check magic */
|
||||||
if ((data[4] == 0x11 || data[4] == 0x12
|
if ((data[4] == 0x11 || data[4] == 0x12
|
||||||
|| data[4] == 0x30 || data[4] == 0x44) && data[5] == 0xaf) {
|
|| data[4] == 0x30 || data[4] == 0x44) && data[5] == 0xaf) {
|
||||||
|
|
Loading…
Reference in a new issue