[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xine-cvslog
Subject:    [xine-cvs] HG: xine-lib: Fix crash with corrupted WMV files when
From:       Darren Salt <linux () youmustbejoking ! demon ! co ! uk>
Date:       2008-08-08 18:34:25
Message-ID: 608e33e144c7eebe016f.1218190688 () hg ! debian ! org
[Download RAW message or body]

# HG changeset patch
# User Darren Salt <linux@youmustbejoking.demon.co.uk>
# Date 1218190688 -3600
# Node ID 608e33e144c7eebe016fbf306771bff4219d1629
# Parent  67bfec7af3472674ba7396bd468b7607339fe102
Fix crash with corrupted WMV files when checking for aspect ratio information.

diff -r 608e33e144c7eebe016fbf306771bff4219d1629 -r \
                67bfec7af3472674ba7396bd468b7607339fe102 src/demuxers/asfheader.c
--- a/src/demuxers/asfheader.c	Fri Aug 08 11:18:08 2008 +0100
+++ b/src/demuxers/asfheader.c	Fri Aug 08 11:10:30 2008 +0100
@@ -545,12 +545,12 @@ static int asf_header_parse_metadata(asf
     if (data_len >= 4)
     {
       char *name = asf_reader_get_string (&reader, name_len, iconv_cd);
-      if (!strcmp (name, "AspectRatioX"))
+      if (name && !strcmp (name, "AspectRatioX"))
       {
         asf_reader_get_32 (&reader, &header->pub.aspect_ratios[stream_id].x);
         data_len -= 4;
       }
-      else if (!strcmp (name, "AspectRatioY"))
+      else if (name && !strcmp (name, "AspectRatioY"))
       {
         asf_reader_get_32 (&reader, &header->pub.aspect_ratios[stream_id].y);
         data_len -= 4;

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Xine-cvslog mailing list
Xine-cvslog@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xine-cvslog


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic