[MPlayer-cvslog] CVS: main/libmpdemux/realrtsp rtsp.c,1.10,1.11

Roberto Togni CVS syncmail at mplayerhq.hu
Sat Apr 16 01:30:46 CEST 2005


CVS change done by Roberto Togni CVS

Update of /cvsroot/mplayer/main/libmpdemux/realrtsp
In directory mail:/var2/tmp/cvs-serv15482

Modified Files:
	rtsp.c 
Log Message:
Fix potential buffer overflow if server answers with  too many lines


Index: rtsp.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/realrtsp/rtsp.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- rtsp.c	18 Oct 2004 20:08:44 -0000	1.10
+++ rtsp.c	15 Apr 2005 23:30:44 -0000	1.11
@@ -397,6 +397,7 @@
   unsigned int answer_seq;
   char **answer_ptr=s->answers;
   int code;
+  int ans_count = 0;
   
   answer=rtsp_get(s);
   if (!answer)
@@ -448,7 +449,7 @@
     }
     *answer_ptr=answer;
     answer_ptr++;
-  } while (strlen(answer)!=0);
+  } while ((strlen(answer)!=0) && (++ans_count < MAX_FIELDS));
   
   s->cseq++;
   




More information about the MPlayer-cvslog mailing list