Re: [FFmpeg-devel] [PATCH 17/36] avcodec/hevc_mp4toannexb_bsf: Check NAL size against available input

2020-05-30 Thread Michael Niedermayer
On Sat, May 30, 2020 at 06:05:22PM +0200, Andreas Rheinhardt wrote: > 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

[FFmpeg-devel] [PATCH 17/36] avcodec/hevc_mp4toannexb_bsf: Check NAL size against available input

2020-05-30 Thread Andreas Rheinhardt
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