ffmpeg | branch: release/5.0 | Andreas Rheinhardt 
<andreas.rheinha...@outlook.com> | Thu May 28 16:57:06 2020 +0200| 
[4e61bf403f334f93135dc031d8ff3a64d8743e0b] | committer: Andreas Rheinhardt

avcodec/vp9_raw_reorder_bsf: Check for existence of data before reading it

Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@outlook.com>
(cherry picked from commit ab25b6aee6295b6fb77c076c85c89df9f2af08e7)

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4e61bf403f334f93135dc031d8ff3a64d8743e0b
---

 libavcodec/vp9_raw_reorder_bsf.c | 5 +++++
 1 file changed, 5 insertions(+)

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

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to