mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 20:51:13 +00:00
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
1 changed files with 4 additions and 1 deletions
|
@ -728,8 +728,11 @@ gst_riff_parse_info (GstElement * element,
|
|||
}
|
||||
}
|
||||
|
||||
if (tsize & 1)
|
||||
if (tsize & 1) {
|
||||
tsize++;
|
||||
if (tsize > size)
|
||||
tsize = size;
|
||||
}
|
||||
|
||||
data += tsize;
|
||||
size -= tsize;
|
||||
|
|
Loading…
Reference in a new issue