riff: prevent crash if rounded up tag size exceeds data size
When rounding up `tsize' exceeds the remaining buffer size, `size' underflows and an invalid read past the buffer data follows.
This commit is contained in:
parent
939baee2bd
commit
41b7504e9c
@ -728,8 +728,11 @@ gst_riff_parse_info (GstElement * element,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tsize & 1)
|
if (tsize & 1) {
|
||||||
tsize++;
|
tsize++;
|
||||||
|
if (tsize > size)
|
||||||
|
tsize = size;
|
||||||
|
}
|
||||||
|
|
||||||
data += tsize;
|
data += tsize;
|
||||||
size -= tsize;
|
size -= tsize;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user