[MPlayer-cvslog] r24991 - trunk/stream/stream.c

cehoyos subversion at mplayerhq.hu
Fri Nov 9 00:07:19 CET 2007


Author: cehoyos
Date: Fri Nov  9 00:07:19 2007
New Revision: 24991

Log:
Fix possible null-pointer-dereference in stream_fill_buffer().

Modified:
   trunk/stream/stream.c

Modified: trunk/stream/stream.c
==============================================================================
--- trunk/stream/stream.c	(original)
+++ trunk/stream/stream.c	Fri Nov  9 00:07:19 2007
@@ -251,7 +251,7 @@ int stream_fill_buffer(stream_t *s){
   switch(s->type){
   case STREAMTYPE_STREAM:
 #ifdef MPLAYER_NETWORK
-    if( s->streaming_ctrl!=NULL ) {
+    if( s->streaming_ctrl!=NULL && s->streaming_ctrl->streaming_read ) {
 	    len=s->streaming_ctrl->streaming_read(s->fd,s->buffer,STREAM_BUFFER_SIZE, s->streaming_ctrl);break;
     } else {
       len=read(s->fd,s->buffer,STREAM_BUFFER_SIZE);break;



More information about the MPlayer-cvslog mailing list