gstreamer/gst-libs/gst/codecparsers
Sebastian Dröge ffa4d84e54 h2645parser: Catch overflows in AVC/HEVC NAL unit length calculations
Offset and size are stored as 32 bit guint and might overflow when
adding the nal_length_size, so let's avoid that.

For the size this would happen if the AVC/HEVC NAL unit size happens to
be stored in 4 bytes and is 4294967292 or higher, which is likely
corrupted data anyway.

For the offset this is something for the caller of these functions to
take care of but is unlikely to happen as it would require parsing on a
>4GB buffer.

Allowing these overflows causes all kinds of follow-up bugs in the
h2645parse elements, ranging from infinite loops and memory leaks to
potential memory corruptions.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2103>
2021-03-24 09:22:48 +00:00
..
codecparsers-prelude.h libs: fix API export/import and 'inconsistent linkage' on MSVC 2018-09-24 14:45:56 +01:00
dboolhuff.AUTHORS codecparsers: vp8: add GStreamer native utilities. 2014-04-18 16:32:40 +02:00
dboolhuff.c libs: fix API export/import and 'inconsistent linkage' on MSVC 2018-09-24 14:45:56 +01:00
dboolhuff.h codecparsers: Add another G_GNUC_INTERNAL 2015-12-30 11:54:14 +02:00
dboolhuff.LICENSE codecparsers: vp8: add GStreamer native utilities. 2014-04-18 16:32:40 +02:00
dboolhuff.PATENTS codecparsers: vp8: add GStreamer native utilities. 2014-04-18 16:32:40 +02:00
gstav1parser.c codecparsers: av1: Fix a typo in frame_restoration_type setting. 2021-01-23 10:53:44 +00:00
gstav1parser.h codecparsers: av1: add the set_operating_point() API. 2020-11-17 19:31:09 +00:00
gsth264parser.c h2645parser: Catch overflows in AVC/HEVC NAL unit length calculations 2021-03-24 09:22:48 +00:00
gsth264parser.h h264parser: Add APIs to allow update SPS/PPS 2020-04-09 19:33:56 +00:00
gsth265parser.c h2645parser: Catch overflows in AVC/HEVC NAL unit length calculations 2021-03-24 09:22:48 +00:00
gsth265parser.h h265parse: Add missing const qualifier 2020-11-02 18:20:32 +00:00
gstjpeg2000sampling.c libs: fix API export/import and 'inconsistent linkage' on MSVC 2018-09-24 14:45:56 +01:00
gstjpeg2000sampling.h codecparsers: GST_EXPORT -> GST_CODEC_PARSERS_API 2018-03-13 12:34:24 +00:00
gstjpegparser.c libs: fix API export/import and 'inconsistent linkage' on MSVC 2018-09-24 14:45:56 +01:00
gstjpegparser.h codecparsers: GST_EXPORT -> GST_CODEC_PARSERS_API 2018-03-13 12:34:24 +00:00
gstmpeg4parser.c documentation: fixed a heap o' typos 2019-11-05 09:11:25 -05:00
gstmpeg4parser.h libs: codecparser: add missing unstable api warning 2020-03-16 18:07:54 +01:00
gstmpegvideometa.c gst: don't use volatile to mean atomic 2021-03-22 14:34:36 +11:00
gstmpegvideometa.h codecparsers: GST_EXPORT -> GST_CODEC_PARSERS_API 2018-03-13 12:34:24 +00:00
gstmpegvideoparser.c codecparsers: fix debug category initialisation 2019-05-25 15:29:25 +02:00
gstmpegvideoparser.h gstmpegvideoparser: Documentation fixes 2019-07-05 00:17:58 +10:00
gstvc1parser.c vc1parser : fix a miswrite 2019-11-11 02:12:34 +00:00
gstvc1parser.h documentation: fixed a heap o' typos 2019-11-05 09:11:25 -05:00
gstvp8parser.c codecparsers: vp8parser: clear the frame_hdr before parsing. 2020-09-25 17:07:43 +08:00
gstvp8parser.h libs: codecparser: add missing unstable api warning 2020-03-16 18:07:54 +01:00
gstvp8rangedecoder.c libs: fix API export/import and 'inconsistent linkage' on MSVC 2018-09-24 14:45:56 +01:00
gstvp8rangedecoder.h codecparsers: GST_EXPORT -> GST_CODEC_PARSERS_API 2018-03-13 12:34:24 +00:00
gstvp9parser.c vp9parser: Add new API for parsing superframe info 2020-03-02 01:31:38 +09:00
gstvp9parser.h vp9parser: Add new API for parsing superframe info 2020-03-02 01:31:38 +09:00
meson.build Meson: Use pkg-config generator 2020-10-23 11:14:18 -04:00
nalutils.c nalutils: Introduce NAL writer helper methods 2020-03-30 07:59:10 +00:00
nalutils.h nalutils: Improve slightly the error trace 2020-06-20 19:47:49 +00:00
parserutils.c libs: fix API export/import and 'inconsistent linkage' on MSVC 2018-09-24 14:45:56 +01:00
parserutils.h codecparsers: Spread some G_GNUC_INTERNAL in various places 2015-12-30 11:40:59 +02:00
vp8utils.c libs: fix API export/import and 'inconsistent linkage' on MSVC 2018-09-24 14:45:56 +01:00
vp8utils.h codecparsers: Spread some G_GNUC_INTERNAL in various places 2015-12-30 11:40:59 +02:00
vp9utils.c codecparsers: vp9: move license blurb into header and remove aux files 2015-12-30 11:04:32 +00:00
vp9utils.h codecparsers: vp9: move license blurb into header and remove aux files 2015-12-30 11:04:32 +00:00