From: Clément Stenac Date: Sun, 2 Apr 2006 13:20:55 +0000 (+0000) Subject: Don't crash on null metas X-Git-Tag: 0.9.0-test0~11640 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=96c8e7b7345e1e712520c347bddd785d7a4a7ee9;p=vlc Don't crash on null metas --- diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c index 261a1fee16..49d399264b 100644 --- a/modules/demux/mp4/mp4.c +++ b/modules/demux/mp4/mp4.c @@ -821,7 +821,10 @@ static int Control( demux_t *p_demux, int i_query, va_list args ) for( p_0xa9xxx = p_udta->p_first; p_0xa9xxx != NULL; p_0xa9xxx = p_0xa9xxx->p_next ) { - char *psz_utf = strdup( p_0xa9xxx->data.p_0xa9xxx->psz_text ); + char *psz_utf; + if( !p_0xa9xxx || !p_0xa9xxx->data.p_0xa9xxx ) + continue; + psz_utf = strdup( p_0xa9xxx->data.p_0xa9xxx->psz_text ); if( psz_utf == NULL ) continue; /* FIXME FIXME: should convert from whatever the character