[MPlayer-users] long filename bug in GUI

Joe Krahn jkrahn at nc.rr.com
Fri Feb 1 14:46:01 CET 2002


MPlayer 0.60-3.0.2 GUI segfaults from very long filenames. It is
able to load the file first, so it may be in the filename display
of the GUI. Running gdb, it dies at a strlen() in libc.

I noticed this piece of code in Gui/wm/ws.c

 char * DisplayName = ":0.0";
 if ( getenv( "DISPLAY" ) ) DisplayName=getenv( "DISPLAY" );
 wsDisplay=XOpenDisplay( DisplayName );


Normally, this is handled automatically by using NULL for the display name:

 char * DisplayName = NULL;
 wsDisplay=XOpenDisplay( DisplayName );

This is the normal way to use the default display, unless
you want to look up DISPLAY manually so you can print it somewhere.


Joe Krahn




More information about the MPlayer-users mailing list