Commit graph

8 commits

Author SHA1 Message Date
David Craven
ca48193cd6 matroska: demux: Strip signal byte from encrypted blocks
Removes the signal byte when the frame is unencrypted to
be consistent with when the frame is encrypted.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5014>
2023-07-11 13:53:02 +00:00
Sebastian Dröge
5d0d42fb95 matroskademux: Make gst_byte_reader_get_data() usage less confusing
This is effectively the same behaviour but retrieving 0 bytes of data is
confusing to read.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4221>
2023-03-18 19:52:40 +00:00
Sebastian Dröge
ad6012159a matroskademux: Fix integer overflows in zlib/bz2/etc decompression code
Various variables were of smaller types than needed and there were no
checks for any overflows when doing additions on the sizes. This is all
checked now.

In addition the size of the decompressed data is limited to 120MB now as
any larger sizes are likely pathological and we can avoid out of memory
situations in many cases like this.

Also fix a bug where the available output size on the next iteration in
the zlib/bz2 decompression code was provided too large and could
potentially lead to out of bound writes.

Thanks to Adam Doupe for analyzing and reporting the issue.

CVE: CVE-2022-1922, CVE-2022-1923, CVE-2022-1924, CVE-2022-1925

https://gstreamer.freedesktop.org/security/sa-2022-0002.html

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1225

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2610>
2022-06-15 17:50:55 +00:00
Rafał Dzięgiel
41385ab6f7 matroska: Ref index table when updating track info
Track index table array was being lost during track info update.
Ref it over to updated info, so it can be used for finding
nearest seek points.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1203>
2021-11-12 12:28:40 +00:00
Rafał Dzięgiel
478f94edc7 matroska: Use g_array_unref everywhere
Instead of using g_array_free which is not thread safe use g_array_unref instead

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1203>
2021-11-12 12:28:40 +00:00
Rafał Dzięgiel
b57a7c3de7 matroska: Set image/attachment structure mimetype
Set structure mimetype to fix data detection by mimetype in other plugins.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1205>
2021-10-21 21:42:00 +00:00
Rafał Dzięgiel
0ba65a00c9 matroska: Treat non-image structure as attachment
Otherwise each structure is named as GstTagImageInfo even if
it does not contain any images which is misleading.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1205>
2021-10-21 21:42:00 +00:00
Thibault Saunier
5ff769d731 Move files from gst-plugins-good into the "subprojects/gst-plugins-good/" subdir 2021-09-24 16:13:50 -03:00
Renamed from gst/matroska/matroska-read-common.c (Browse further)