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)
This commit is contained in:
Andreas Rheinhardt 2020-05-28 16:57:06 +02:00
parent cffa10a0cb
commit 4e61bf403f

View File

@ -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");