aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/webmdashenc.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-07-19 10:16:33 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2021-02-22 21:56:57 +0100
commite114a337be61e3c37f74c15c196bcb9ba6b6300d (patch)
treeff845cbcb8ca908d2f37808aec16292994ecbb4d /libavformat/webmdashenc.c
parentf25caec87f0c9409b320e63202145ce4ae5d8929 (diff)
downloadffmpeg-e114a337be61e3c37f74c15c196bcb9ba6b6300d.tar.gz
avformat/matroskadec: Avoid undefined pointer arithmetic
The Matroska demuxer currently always opens a GetByteContext to read the content of the projection's private data buffer; it does this even if there is no private data buffer in which case opening the GetByteContext will lead to a NULL + 0 which is undefined behaviour. Furthermore, in this case the code relied both on the implicit checks of the bytestream2 API as well as on the fact that it returns zero if there is not enough data available. Both of these issues have been addressed by not using the bytestream API any more; instead the data is simply read directly by using AV_RB. This is possible because the offsets are constants. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> (cherry picked from commit 880519c1de3f2bfad04e6fef93e0bf41129ff99e)
Diffstat (limited to 'libavformat/webmdashenc.c')
0 files changed, 0 insertions, 0 deletions