]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[Core] switch_rtp_create: Coverity 1227620 Calling risky function 2546/head
authorAndrey Volk <andywolk@gmail.com>
Fri, 7 Jun 2024 11:53:44 +0000 (14:53 +0300)
committerAndrey Volk <andywolk@gmail.com>
Mon, 29 Jul 2024 21:16:15 +0000 (00:16 +0300)
src/switch_rtp.c

index a27703f4497d64a3ee3bd1dfc0329f346f057ba5..6f33b4799260041ea983a493207b11013177095a 100644 (file)
@@ -4517,7 +4517,7 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_create(switch_rtp_t **new_rtp_session
                switch_sockaddr_create(&rtp_session->rtcp_from_addr, pool);
        }
 
-       rtp_session->seq = (uint16_t) rand();
+       rtp_session->seq = (uint16_t) switch_rand();
        rtp_session->ssrc = (uint32_t) ((intptr_t) rtp_session + (switch_time_t) switch_epoch_time_now(NULL));
 #ifdef DEBUG_TS_ROLLOVER
        rtp_session->last_write_ts = TS_ROLLOVER_START;