[MPlayer-cvslog] r35308 - trunk/stream/librtsp/rtsp_rtp.c

reimar subversion at mplayerhq.hu
Wed Oct 31 20:08:19 CET 2012


Author: reimar
Date: Wed Oct 31 20:08:19 2012
New Revision: 35308

Log:
Remove useless indirection that in addition completely broke the code.

The strcpy would have copied only up to the first 0 byte,
i.e. exactly 3 bytes, leaving the remaining byte, uninitialized,
possibly random, possibly leaking private on-stack data.

Modified:
   trunk/stream/librtsp/rtsp_rtp.c

Modified: trunk/stream/librtsp/rtsp_rtp.c
==============================================================================
--- trunk/stream/librtsp/rtsp_rtp.c	Wed Oct 31 20:01:55 2012	(r35307)
+++ trunk/stream/librtsp/rtsp_rtp.c	Wed Oct 31 20:08:19 2012	(r35308)
@@ -92,9 +92,7 @@ rtcp_send_rr (rtsp_t *s, struct rtp_rtsp
 
   if (st->count == RTCP_SEND_FREQUENCY)
   {
-    char rtcp_content[RTCP_RR_SIZE];
-    strcpy (rtcp_content, RTCP_RR);
-    send (st->rtcp_socket, rtcp_content, RTCP_RR_SIZE, DEFAULT_SEND_FLAGS);
+    send (st->rtcp_socket, RTCP_RR, RTCP_RR_SIZE, DEFAULT_SEND_FLAGS);
 
     /* ping RTSP server to keep connection alive.
        we use OPTIONS instead of PING as not all servers support it */


More information about the MPlayer-cvslog mailing list