diff mbox

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

Message ID 20191027171036.22297-3-cus@passwd.hu
State Accepted
Commit 99e000704690b2b954c18ca585cc56dfd99e9c16
Headers show

Commit Message

Marton Balint Oct. 27, 2019, 5:10 p.m. UTC
Signed-off-by: Marton Balint <cus@passwd.hu>
---
 libavcodec/libvpxdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

James Zern Nov. 1, 2019, 6:52 p.m. UTC | #1
On Sun, Oct 27, 2019 at 10:11 AM Marton Balint <cus@passwd.hu> wrote:
>
> Signed-off-by: Marton Balint <cus@passwd.hu>
> ---
>  libavcodec/libvpxdec.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>

lgtm. good catch.
James Zern Nov. 6, 2019, 7:29 a.m. UTC | #2
On Fri, Nov 1, 2019 at 11:52 AM James Zern <jzern@google.com> wrote:
>
> On Sun, Oct 27, 2019 at 10:11 AM Marton Balint <cus@passwd.hu> wrote:
> >
> > Signed-off-by: Marton Balint <cus@passwd.hu>
> > ---
> >  libavcodec/libvpxdec.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
>
> lgtm. good catch.

applied, thanks.
diff mbox

Patch

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;