mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 03:31:05 +00:00
wavpackparse: Fix potential integer overflow on ID_ODD_SIZE blocks
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6498>
This commit is contained in:
parent
6402978a48
commit
eefb7c1638
1 changed files with 4 additions and 1 deletions
|
@ -322,8 +322,11 @@ gst_wavpack_parse_frame_metadata (GstWavpackParse * parse, GstBuffer * buf,
|
|||
size <<= 8;
|
||||
size += c;
|
||||
size <<= 1;
|
||||
if (id & ID_ODD_SIZE)
|
||||
if (id & ID_ODD_SIZE) {
|
||||
if (size == 0)
|
||||
goto read_failed;
|
||||
size--;
|
||||
}
|
||||
|
||||
CHECK (gst_byte_reader_get_data (&br, size + (size & 1), &data));
|
||||
gst_byte_reader_init (&mbr, data, size);
|
||||
|
|
Loading…
Reference in a new issue