Files
ffmpeg/libavcodec
Andreas Rheinhardt 82d70d8038 avcodec/hevc_mp4toannexb_bsf: Check NAL size against available input
The hevc_mp4toannexb bsf does not explicitly check whether a NAL unit
is so big that it extends beyond the end of the input packet; it does so
only implicitly by using the checked version of the bytestream2 API.
But this has downsides compared to real checks: It can lead to huge
allocations (up to 2GiB) even when the input packet is just a few bytes.
And furthermore it leads to uninitialized data being output.
So add a check to error out early if it happens.

Also check directly whether there is enough data for the length field.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
(cherry picked from commit ea1b71e82f)
2020-06-15 04:18:16 +02:00
..
2020-05-27 22:13:39 +02:00
2020-05-26 10:23:06 +01:00
2020-05-30 18:02:55 +02:00
2020-05-30 18:02:55 +02:00
2020-05-21 09:31:08 +02:00
2020-06-05 18:14:17 +02:00
2020-06-14 22:02:34 +02:00
2020-05-26 10:52:12 +01:00
2020-05-26 10:52:12 +01:00
2020-05-26 10:52:12 +01:00
2020-06-14 22:02:34 +02:00
2020-06-08 20:45:56 +02:00
2020-05-30 18:02:55 +02:00
2020-05-30 18:02:55 +02:00
2020-05-22 22:23:18 +02:00
2020-05-27 22:13:39 +02:00
2020-06-08 01:22:34 +02:00
2020-05-23 07:07:36 +02:00