]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/libvpxdec.c
avcodec/libvpxdec: make sure BlockAdditional side data size >= 8
[ffmpeg] / libavcodec / libvpxdec.c
index 164dbda49b08d18d736b810ec6cf18e1e3e56ad1..cc9114088689538e1539e99889638ad0fb11a5f9 100644 (file)
@@ -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;