mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 01:45:33 +00:00
matroskamux: fix possible crash with malformed dirac codec_data
Since size is unsigned, we need to safeguard against wrapping below zero.
This commit is contained in:
parent
6082f27d48
commit
6fc85e6c9d
1 changed files with 1 additions and 1 deletions
|
@ -2594,7 +2594,7 @@ gst_matroska_mux_handle_dirac_packet (GstMatroskaMux * mux,
|
|||
|
||||
next_parse_offset = GST_READ_UINT32_BE (data + 5);
|
||||
|
||||
if (G_UNLIKELY (next_parse_offset == 0))
|
||||
if (G_UNLIKELY (next_parse_offset == 0 || next_parse_offset > size))
|
||||
break;
|
||||
|
||||
data += next_parse_offset;
|
||||
|
|
Loading…
Reference in a new issue