]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/libvpxdec: make sure BlockAdditional side data size >= 8
authorMarton Balint <cus@passwd.hu>
Sun, 27 Oct 2019 17:10:33 +0000 (18:10 +0100)
committerJames Zern <jzern@google.com>
Wed, 6 Nov 2019 07:14:24 +0000 (23:14 -0800)
Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: James Zern <jzern@google.com>
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;