[FFmpeg-devel] [PATCH 3/6] avcodec/libvpxdec: make sure BlockAdditional side data size >= 8

Marton Balint cus at passwd.hu
Sun Oct 27 19:10:33 EET 2019


Signed-off-by: Marton Balint <cus at passwd.hu>
---
 libavcodec/libvpxdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/libvpxdec.c b/libavcodec/libvpxdec.c
index 164dbda49b..cc91140886 100644
--- a/libavcodec/libvpxdec.c
+++ b/libavcodec/libvpxdec.c
@@ -191,7 +191,7 @@ static int vpx_decode(AVCodecContext *avctx,
     side_data = av_packet_get_side_data(avpkt,
                                         AV_PKT_DATA_MATROSKA_BLOCKADDITIONAL,
                                         &side_data_size);
-    if (side_data_size > 1) {
+    if (side_data_size >= 8) {
         const uint64_t additional_id = AV_RB64(side_data);
         side_data += 8;
         side_data_size -= 8;
-- 
2.16.4



More information about the ffmpeg-devel mailing list