[vlc] Re: null pointer dereference in ty plugin Was: vlc streaming problems

Rémi Denis-Courmont courmisch at via.ecp.fr
Mon Aug 15 16:30:17 CEST 2005


Le Lundi 15 Août 2005 00:31, Florian Lohoff a écrit :
> I guess the offending code is:
>
> modules/demux/ty.c
>     162     if ( U32_AT(p_peek) != TIVO_PES_FILEID ||
>     163          U32_AT(&p_peek[4]) != 0x02 ||
>     164          U32_AT(&p_peek[8]) != CHUNK_SIZE )
>     165     {
>     166         /* doesn't look like a TY file... */
>     167         char *psz_ext = strrchr(p_demux->psz_path, '.');
>     168
>     169         if( !p_demux->b_force &&
>     170             (!psz_ext || strcasecmp(psz_ext, ".ty")) ) return
> VLC_EGENERIC; 171         msg_Warn( p_demux, "this does not look like
> a TY file, " 172                   "continuing anyway..." );
>     173     }
>
> If the filename does not contain a "." strrchr returns NULL where
>
> if ... !psz_ext || strcasecmp(psz_ext ...

No, that's correct. If psz_ext is NULL, !psz_ext will be true, so 
strcasecmp will NOT be called. The bug must be somewhere else.

Using valgrind or gdb might help.

-- 
Rémi Denis-Courmont
http://www.simphalempin.com/home/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc/attachments/20050815/a287a4ec/attachment.sig>


More information about the vlc mailing list