gstreamer/gst/matroska
Sebastian Dröge 242f3cae6d matroskademux: Fix extraction of multichannel WavPack
The old code had a couple of issues that all lead to potential memory
safety bugs.

  - Use a constant for the Wavpack4Header size instead of using sizeof.
    It's written out into the data and not from the struct and who knows
    what special alignment/padding requirements some C compilers have.
  - gst_buffer_set_size() does not realloc the buffer when setting a
    bigger size than allocated, it only allows growing up to the maximum
    allocated size. Instead use a GstAdapter to collect all the blocks
    and take out everything at once in the end.
  - Check that enough data is actually available in the input and
    otherwise handle it an error in all cases instead of silently
    ignoring it.

Among other things this fixes out of bounds writes because the code
assumed gst_buffer_set_size() can grow the buffer and simply wrote after
the end of the buffer.

Thanks to Natalie Silvanovich for reporting.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/859

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/902>
2021-03-15 12:34:49 +00:00
..
ebml-ids.h matroskamux: Use nanosecond precision for DateUTC 2019-11-22 16:30:50 +01:00
ebml-read.c matroskamux: Use nanosecond precision for DateUTC 2019-11-22 16:30:50 +01:00
ebml-read.h Fix FSF address 2012-11-04 00:07:18 +00:00
ebml-write.c matroskamux: Use nanosecond precision for DateUTC 2019-11-22 16:30:50 +01:00
ebml-write.h matroska: Remove white space 2019-05-01 14:28:36 +00:00
lzo.c matroska: get rid of _stdint.h include 2016-02-08 00:11:55 +00:00
lzo.h Decode the codec private data and following ContentEncoding if necessary. 2008-08-02 18:18:05 +00:00
matroska-demux.c matroskademux: Fix extraction of multichannel WavPack 2021-03-15 12:34:49 +00:00
matroska-demux.h matroska: Provide audio lead-in for some lossy formats 2019-08-07 18:51:57 -04:00
matroska-ids.c matroska: Handle interlaced field order 2019-08-07 14:12:32 +00:00
matroska-ids.h matroskademux: Fix extraction of multichannel WavPack 2021-03-15 12:34:49 +00:00
matroska-mux.c matroska-mux: Fix sparse stream crash 2020-10-28 01:55:06 +11:00
matroska-mux.h matroskamux: Add property to set DateUTC 2019-11-25 14:01:48 +01:00
matroska-parse.c documentation: fix a number of typos 2019-10-05 22:38:11 +00:00
matroska-parse.h matroska: Remove unused variable 2015-08-13 14:11:12 +01:00
matroska-read-common.c matroskamux: Add property to set DateUTC 2019-11-25 14:01:48 +01:00
matroska-read-common.h matroska: Remove white space 2019-05-01 14:28:36 +00:00
matroska.c Fix FSF address 2012-11-04 00:07:18 +00:00
meson.build doc: Port documentation to hotdoc 2019-05-13 11:34:56 -04:00
webm-mux.c docs: Port all docstring to gtk-doc markdown 2019-05-13 10:24:40 -04:00
webm-mux.h Fix FSF address 2012-11-04 00:07:18 +00:00