[vlc-commits] ASX: fix NULL derefence (LP#785979)

Rémi Denis-Courmont git at videolan.org
Sat May 21 14:07:41 CEST 2011


vlc/vlc-1.1 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat May 21 15:00:28 2011 +0300| [6849c233ac434403909da29e0861875abebcc718] | committer: Rémi Denis-Courmont

ASX: fix NULL derefence (LP#785979)

Regression introduced by commit 4a590357633e5ad7419034bd7f20bf175cc12f45.
(cherry picked from commit 719c0015f8a6889fd60de0d0ec95c189de8a8976)

> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=6849c233ac434403909da29e0861875abebcc718
---

 modules/demux/playlist/asx.c |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/modules/demux/playlist/asx.c b/modules/demux/playlist/asx.c
index 02e445b..caf8577 100644
--- a/modules/demux/playlist/asx.c
+++ b/modules/demux/playlist/asx.c
@@ -439,11 +439,15 @@ static int Demux( demux_t *p_demux )
                     }
                     else continue;
                 }
-                if( ( psz_parse = strcasestr( psz_parse, "/>" ) ) )
-                    psz_parse += 2;
-                else if( ( psz_parse = strcasestr( psz_parse, "</MoreInfo>") ) )
-                    psz_parse += 11;
-                else continue;
+                if( ( psz_backup = strcasestr( psz_parse, "/>" ) ) )
+                    psz_parse = psz_backup + 2;
+                else if( ( psz_backup = strcasestr( psz_parse, "</MoreInfo>") ) )
+                    psz_parse = psz_backup + 11;
+                else
+                {
+                    psz_parse = NULL;
+                    continue;
+                }
             }
             else if( !strncasecmp( psz_parse, "<ABSTRACT>", 10 ) )
             {
@@ -483,7 +487,6 @@ static int Demux( demux_t *p_demux )
                 }
                 if( ( psz_parse = strcasestr( psz_parse, "/>" ) ) )
                     psz_parse += 2;
-                else continue;
             }
             else if( !strncasecmp( psz_parse, "</Entry>", 8 ) )
             {



More information about the vlc-commits mailing list