[MPlayer-users] null pointer dereference when pressing d

Paul TT paultt at hackerjournal.it
Mon Nov 14 11:14:59 CET 2005


On Sun, 13 Nov 2005 14:22:25 +0100
Matthias Lederhofer <matled at gmx.net> wrote:

> Hi,
> 
> Pressing "d" while playing audio causes a segfault caused by a null
> pointer dereference in mplayer.c line 3279. This patch should work but
> I am not familiar with the source code of mplayer so I am not sure if
> there is anything missing.
> 
> Index: mplayer.c
> ===================================================================
> RCS file: /cvsroot/mplayer/main/mplayer.c,v
> retrieving revision 1.887
> diff -u -r1.887 mplayer.c
> --- mplayer.c	10 Nov 2005 22:25:53 -0000	1.887
> +++ mplayer.c	13 Nov 2005 13:20:41 -0000
> @@ -3276,8 +3276,10 @@
>        if(v < 0){
>  	frame_dropping = (frame_dropping+1)%3;
>  #ifdef USE_OSD
> -       osd_show_framedropping=sh_video->fps/2;
> -       vo_osd_changed(OSDTYPE_SUBTITLE);
> +	if (sh_video) {
> +	 osd_show_framedropping=sh_video->fps/2;
> +	 vo_osd_changed(OSDTYPE_SUBTITLE);
> +	}
>  #endif
>        }
>        else


you're right.
indeed other keys too don't check for the presence of the video, which
may be right, but if you touch by error one of that key it crashes,
which in turn is worse then....
there is a patch on the go, in cvs, which cleans up a lot of the
OSD code, resolving also this issue, so it's just a matter of waiting
some time (not to much, i hope :-))

anyway, for the next time:
you should read DOCS/tech/patches.txt, then send patches to -dev-eng
mailing list.... 

thanx




More information about the MPlayer-users mailing list