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

Florian Lohoff flo at rfc822.org
Sun Aug 14 23:31:29 CEST 2005


On Sun, Aug 14, 2005 at 08:11:34PM +1000, Richard Stephens wrote:
> #2: debian linux unstable
> vlc 0.8.2-svn

> [00000254] main input debug: creating demux: access='udp' demux='' path=''
> [00000260] main demuxer debug: looking for demux2 module: 37 candidates
> [00000260] main demuxer debug: looking for id3 module: 2 candidates
> [00000260] id3tag demuxer debug: checking for ID3 tag
> [00000162] main module debug: using id3 module "id3tag"
> [00000162] main module debug: unlocking module "id3tag"
> Segmentation fault
> richard at rb:~$

Try removing or renaming the ty module - I had a similar problem and
compiled vlc with debugging symbols to find out about this.

Move this away ...
/usr/lib/vlc/demux/libty_plugin.so

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 ...

Will execute the strcasecmp in case psz_ext is NULL.

Flo
-- 
Florian Lohoff                  flo at rfc822.org             +49-171-2280134
                        Heisenberg may have been here.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://mailman.videolan.org/pipermail/vlc/attachments/20050814/655d0373/attachment.sig>


More information about the vlc mailing list