[Mplayer-cvslog] CVS: main/libmpdemux demux_xmms.c,1.3,1.4

Arpi of Ize arpi at mplayerhq.hu
Sat Dec 28 15:06:51 CET 2002


Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var/tmp.root/cvs-serv22382

Modified Files:
	demux_xmms.c 
Log Message:
The patch fixes a nullpointer dereference and free of NULL in demux_close_xmms
when no matching plugin was found.
 Alexander.Gottwald at informatik.tu-chemnitz.de


Index: demux_xmms.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_xmms.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- demux_xmms.c	23 Dec 2002 22:13:46 -0000	1.3
+++ demux_xmms.c	28 Dec 2002 14:06:48 -0000	1.4
@@ -326,8 +326,11 @@
   xmms_priv_t *priv=demuxer->priv;
   xmms_playing=0;
   xmms_audiopos=0; // xmp on exit waits until buffer is free enough
-  priv->ip->stop();
-  free(priv); xmms_priv=demuxer->priv=NULL;
+  if (priv != NULL) {
+    if (priv->ip != NULL)
+      priv->ip->stop();
+    free(priv); xmms_priv=demuxer->priv=NULL;
+  }
   cleanup_plugins();
   return 1;
 }




More information about the MPlayer-cvslog mailing list