diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2020-05-28 16:57:06 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-03-31 10:48:50 +0200 |
commit | ab25b6aee6295b6fb77c076c85c89df9f2af08e7 (patch) | |
tree | 369ac74839c40cf276a9cd2db750f6053c117937 /libavcodec | |
parent | 55e509b0944e52de2227452bca668c2d72fa0de1 (diff) | |
download | ffmpeg-ab25b6aee6295b6fb77c076c85c89df9f2af08e7.tar.gz |
avcodec/vp9_raw_reorder_bsf: Check for existence of data before reading it
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/vp9_raw_reorder_bsf.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/vp9_raw_reorder_bsf.c b/libavcodec/vp9_raw_reorder_bsf.c index f98752c775..e7d301cb85 100644 --- a/libavcodec/vp9_raw_reorder_bsf.c +++ b/libavcodec/vp9_raw_reorder_bsf.c @@ -292,6 +292,11 @@ static int vp9_raw_reorder_filter(AVBSFContext *bsf, AVPacket *out) return err; } + if (!in->size) { + av_packet_free(&in); + return AVERROR_INVALIDDATA; + } + if ((in->data[in->size - 1] & 0xe0) == 0xc0) { av_log(bsf, AV_LOG_ERROR, "Input in superframes is not " "supported.\n"); |