aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil/xtea.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>2020-07-24 04:25:45 +0200
commit880519c1de3f2bfad04e6fef93e0bf41129ff99e (patch)
tree751cff4ffe7e59e1675b18f919903a181c4b46e5 /libavutil/xtea.c
parent28ce651c6d53866c1b8c3b49b8b66a2e967aa273 (diff)
downloadffmpeg-880519c1de3f2bfad04e6fef93e0bf41129ff99e.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>
Diffstat (limited to 'libavutil/xtea.c')
0 files changed, 0 insertions, 0 deletions