[vlc-commits] ASX: fix NULL derefence (LP#785979)
Rémi Denis-Courmont
git at videolan.org
Sat May 21 14:06:55 CEST 2011
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat May 21 15:00:28 2011 +0300| [719c0015f8a6889fd60de0d0ec95c189de8a8976] | committer: Rémi Denis-Courmont
ASX: fix NULL derefence (LP#785979)
Regression introduced by commit 4a590357633e5ad7419034bd7f20bf175cc12f45.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=719c0015f8a6889fd60de0d0ec95c189de8a8976
---
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