[FFmpeg-devel] [PATCH] matroskadec: execute seekheads recursively

Michael Niedermayer michaelni at gmx.at
Sat Oct 18 00:40:15 CEST 2014


On Fri, Oct 17, 2014 at 03:27:49PM +0200, Michael Niedermayer wrote:
> On Fri, Oct 17, 2014 at 01:55:35AM -0500, Rodger Combs wrote:
> > 
> > > On Oct 17, 2014, at 01:52, Rodger Combs <rodger.combs at gmail.com> wrote:
> > > 
> > > 
> > >> On Oct 17, 2014, at 01:16, Rodger Combs <rodger.combs at gmail.com <mailto:rodger.combs at gmail.com>> wrote:
> > >> 
> > >> This fixes https://trac.ffmpeg.org/ticket/3934 <https://trac.ffmpeg.org/ticket/3934>, but I'm not sure if there was a good reason for this to be here to begin with. Perhaps a protection against infinite recursion (though I believe EBML_MAX_DEPTH serves that purpose to some degree)?
> > >> <0001-matroskadec-execute-seekheads-recursively.patch>
> > > 
> > > Evidently either I or my mail client screwed up and the patch didn't get attached. Whoops.
> > > <0001-matroskadec-execute-seekheads-recursively.patch>
> > > Let's try that again...
> > 
> > Welp, apparently my email client's borked badly in some way. Here's a gist link instead: https://gist.github.com/08f111e72b8b5ddba078
> 
> copy and pasted so our archives dont depend on external links as well
> as for easy revieweing
> 
> From 4cf14a9d117da69b64c267e6f982931cfa60a300 Mon Sep 17 00:00:00 2001
> From: Rodger Combs <rodger.combs at gmail.com>
> Date: Fri, 17 Oct 2014 00:35:12 -0500
> Subject: [PATCH] matroskadec: execute seekheads recursively
> 
> Fixes https://trac.ffmpeg.org/ticket/3934
> ---
>  libavformat/matroskadec.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
> index b742319..b437e74 100644
> --- a/libavformat/matroskadec.c
> +++ b/libavformat/matroskadec.c
> @@ -1368,7 +1368,6 @@ static int matroska_parse_seekhead_entry(MatroskaDemuxContext *matroska,
>      int ret = 0;
> 
>      if (idx >= seekhead_list->nb_elem            ||
> -        seekhead[idx].id == MATROSKA_ID_SEEKHEAD ||
>          seekhead[idx].id == MATROSKA_ID_CLUSTER)
>          return 0;

ebml_parse() that gets called as a result of this change does not
succeed and causes the one and only seekhead entry to return failure
so i think this doesnt execute seekheads recursively

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

It is dangerous to be right in matters on which the established authorities
are wrong. -- Voltaire
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20141018/d620f7b9/attachment.asc>


More information about the ffmpeg-devel mailing list