diff mbox

[FFmpeg-devel,PATCH/RFC] lavf/avidec: Do not fail for very large idx1 tags

Message ID 201610171829.42782.cehoyos@ag.or.at
State Accepted
Commit a20f3238be9381518ef8e7fcbb2a4dc7b6acdc93
Headers show

Commit Message

Carl Eugen Hoyos Oct. 17, 2016, 4:29 p.m. UTC
Hi!

Attached patch fixes the file mentioned in github pull request 197, 
it can be played with MPlayer, vlc, xine and totem.

Please comment, Carl Eugen
From 646a765749e08bb48f74488ad9f539cbc736673c Mon Sep 17 00:00:00 2001
From: Carl Eugen Hoyos <cehoyos@ag.or.at>
Date: Mon, 17 Oct 2016 18:25:48 +0200
Subject: [PATCH] lavf/avidec: Do not fail for very large idx1 tags.

Fixes demuxing the sample file from github pull request 197,
the size of its idx1 tag is 6171936 bytes, followed by a JUNK
tag of 9505704 bytes.
---
 libavformat/avidec.c |    2 ++
 1 file changed, 2 insertions(+)

Comments

Michael Niedermayer Oct. 17, 2016, 8:32 p.m. UTC | #1
On Mon, Oct 17, 2016 at 06:29:42PM +0200, Carl Eugen Hoyos wrote:
> Hi!
> 
> Attached patch fixes the file mentioned in github pull request 197, 
> it can be played with MPlayer, vlc, xine and totem.
> 
> Please comment, Carl Eugen

>  avidec.c |    2 ++
>  1 file changed, 2 insertions(+)
> 0b5d5e672b7ec13a8c8aa1597ceb21b16b5e61b8  0001-lavf-avidec-Do-not-fail-for-very-large-idx1-tags.patch
> From 646a765749e08bb48f74488ad9f539cbc736673c Mon Sep 17 00:00:00 2001
> From: Carl Eugen Hoyos <cehoyos@ag.or.at>
> Date: Mon, 17 Oct 2016 18:25:48 +0200
> Subject: [PATCH] lavf/avidec: Do not fail for very large idx1 tags.
> 
> Fixes demuxing the sample file from github pull request 197,
> the size of its idx1 tag is 6171936 bytes, followed by a JUNK
> tag of 9505704 bytes.
> ---
>  libavformat/avidec.c |    2 ++
>  1 file changed, 2 insertions(+)

LGTM

thx

[...]
Carl Eugen Hoyos Oct. 17, 2016, 10:38 p.m. UTC | #2
2016-10-17 22:32 GMT+02:00 Michael Niedermayer <michael@niedermayer.cc>:
> On Mon, Oct 17, 2016 at 06:29:42PM +0200, Carl Eugen Hoyos wrote:
>> Hi!
>>
>> Attached patch fixes the file mentioned in github pull request 197,
>> it can be played with MPlayer, vlc, xine and totem.
>>
>> Please comment, Carl Eugen
>
>>  avidec.c |    2 ++
>>  1 file changed, 2 insertions(+)
>> 0b5d5e672b7ec13a8c8aa1597ceb21b16b5e61b8  0001-lavf-avidec-Do-not-fail-for-very-large-idx1-tags.patch
>> From 646a765749e08bb48f74488ad9f539cbc736673c Mon Sep 17 00:00:00 2001
>> From: Carl Eugen Hoyos <cehoyos@ag.or.at>
>> Date: Mon, 17 Oct 2016 18:25:48 +0200
>> Subject: [PATCH] lavf/avidec: Do not fail for very large idx1 tags.
>>
>> Fixes demuxing the sample file from github pull request 197,
>> the size of its idx1 tag is 6171936 bytes, followed by a JUNK
>> tag of 9505704 bytes.
>> ---
>>  libavformat/avidec.c |    2 ++
>>  1 file changed, 2 insertions(+)
>
> LGTM

Patch applied.

Thank you, Carl Eugen
diff mbox

Patch

diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index 2c81267..b291625 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -993,6 +993,8 @@  FF_ENABLE_DEPRECATION_WARNINGS
                 avi->movi_end  = avi->fsize;
                 goto end_of_header;
             }
+        /* Do not fail for very large idx1 tags */
+        case MKTAG('i', 'd', 'x', '1'):
             /* skip tag */
             size += (size & 1);
             avio_skip(pb, size);