[FFmpeg-devel] [PATCH] matroskadec: skip invalid tags with no TagName

Anton Khirnov anton
Wed Nov 3 07:34:38 CET 2010


On Wed, Nov 03, 2010 at 01:21:07AM +0100, Aurelien Jacobs wrote:
> On Sat, Oct 30, 2010 at 09:54:39AM +0200, Anton Khirnov wrote:
> > fixes segfault in issue 2328
> > ---
> >  libavformat/matroskadec.c |    5 +++++
> >  1 files changed, 5 insertions(+), 0 deletions(-)
> > 
> > diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
> > index 136839a..b712415 100644
> > --- a/libavformat/matroskadec.c
> > +++ b/libavformat/matroskadec.c
> > @@ -1033,6 +1033,11 @@ static void matroska_convert_tag(AVFormatContext *s, EbmlList *list,
> >  
> >      for (i=0; i < list->nb_elem; i++) {
> >          const char *lang = strcmp(tags[i].lang, "und") ? tags[i].lang : NULL;
> > +
> > +        if (!tags[i].name) {
> > +            av_log(s, AV_LOG_WARNING, "Skipping tag with no TagName.\n");
> > +            continue;
> > +        }
> 
> TagName is mandatory according to the spec. Maybe the message should
> indicate that the file is invalid ?
> Except this, patch looks OK.
applied with this change

-- 
Anton Khirnov
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20101103/69dcd068/attachment.pgp>



More information about the ffmpeg-devel mailing list