diff stream/librtsp/rtsp_rtp.c @ 35214:126ce1e7f87b

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.
author reimar
date Wed, 31 Oct 2012 19:08:19 +0000
parents 8fa2f43cb760
children 7a93fe8c6956
line wrap: on
line diff
--- a/stream/librtsp/rtsp_rtp.c	Wed Oct 31 19:01:55 2012 +0000
+++ b/stream/librtsp/rtsp_rtp.c	Wed Oct 31 19:08:19 2012 +0000
@@ -92,9 +92,7 @@
 
   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 */