[vlc-commits] commit: taglib: fix NULL deferences after dynamic cast ( Lukáš Lalinský )
git at videolan.org
git at videolan.org
Wed Aug 11 21:08:35 CEST 2010
vlc/vlc-1.0 | branch: master | Lukáš Lalinský <lalinsky at gmail.com> | Wed Aug 11 22:02:30 2010 +0300| [35d880270b94b1fa5700811492527a131eccf6dc] | committer: Rémi Denis-Courmont
taglib: fix NULL deferences after dynamic cast
Reported-by: FortiGuard Lab
Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>
(cherry picked from commit 0a3d05b4058fe683e2ef49da8ece9214ade01870)
> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.0.git/?a=commit;h=35d880270b94b1fa5700811492527a131eccf6dc
---
modules/meta_engine/taglib.cpp | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/modules/meta_engine/taglib.cpp b/modules/meta_engine/taglib.cpp
index 43ac697..9faf922 100644
--- a/modules/meta_engine/taglib.cpp
+++ b/modules/meta_engine/taglib.cpp
@@ -120,6 +120,8 @@ static void ReadMetaFromId3v2( ID3v2::Tag* tag, demux_t* p_demux, demux_meta_t*
{
ID3v2::UniqueFileIdentifierFrame* p_ufid =
dynamic_cast<ID3v2::UniqueFileIdentifierFrame*>(*iter);
+ if( !p_ufid )
+ continue;
const char *owner = p_ufid->owner().toCString();
if (!strcmp( owner, "http://musicbrainz.org" ))
{
@@ -140,6 +142,8 @@ static void ReadMetaFromId3v2( ID3v2::Tag* tag, demux_t* p_demux, demux_meta_t*
{
ID3v2::UserTextIdentificationFrame* p_txxx =
dynamic_cast<ID3v2::UserTextIdentificationFrame*>(*iter);
+ if( !p_txxx )
+ continue;
vlc_meta_AddExtra( p_meta, p_txxx->description().toCString( true ),
p_txxx->fieldList().toString().toCString( true ) );
}
@@ -196,6 +200,8 @@ static void ReadMetaFromId3v2( ID3v2::Tag* tag, demux_t* p_demux, demux_meta_t*
{
ID3v2::AttachedPictureFrame* p_apic =
dynamic_cast<ID3v2::AttachedPictureFrame*>(*iter);
+ if( !p_apic )
+ continue;
input_attachment_t *p_attachment;
const char *psz_mime;
More information about the vlc-commits
mailing list