aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mpegaudio_parser.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-05-27 19:09:14 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-06-15 04:46:05 +0200
commit07eb039e047b68227b08428314314ff7b1273efa (patch)
treed34c4920845a214701a0727e1f332200c3705d19 /libavcodec/mpegaudio_parser.c
parent221e490d42bc1c20c61aee385d5bfe003a1a8c87 (diff)
downloadffmpeg-07eb039e047b68227b08428314314ff7b1273efa.tar.gz
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 ea1b71e82f5a1752d59d3bfb9704092a79eba6b5)
Diffstat (limited to 'libavcodec/mpegaudio_parser.c')
0 files changed, 0 insertions, 0 deletions