aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/vp9_raw_reorder_bsf.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2020-05-28 16:57:06 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-04-01 13:20:56 +0200
commit4e61bf403f334f93135dc031d8ff3a64d8743e0b (patch)
tree4a193d35db491ce63d7c2d12251f4e12c0c9de3e /libavcodec/vp9_raw_reorder_bsf.c
parentcffa10a0cb2fe81fea532fc883fb9c7d84f5bad0 (diff)
downloadffmpeg-4e61bf403f334f93135dc031d8ff3a64d8743e0b.tar.gz
avcodec/vp9_raw_reorder_bsf: Check for existence of data before reading it
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> (cherry picked from commit ab25b6aee6295b6fb77c076c85c89df9f2af08e7)
Diffstat (limited to 'libavcodec/vp9_raw_reorder_bsf.c')
-rw-r--r--libavcodec/vp9_raw_reorder_bsf.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/vp9_raw_reorder_bsf.c b/libavcodec/vp9_raw_reorder_bsf.c
index 6562399159..1608360fe1 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");