https://bugs.gentoo.org/875863 https://github.com/pjsip/pjproject/commit/d2acb9af4e27b5ba75d658690406cec9c274c5cc From d2acb9af4e27b5ba75d658690406cec9c274c5cc Mon Sep 17 00:00:00 2001 From: Riza Sulistyo Date: Thu, 6 Oct 2022 13:55:13 +0700 Subject: [PATCH] Merge pull request from GHSA-wx5m-cj97-4wwg --- pjmedia/src/pjmedia/transport_srtp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pjmedia/src/pjmedia/transport_srtp.c b/pjmedia/src/pjmedia/transport_srtp.c index 2d393beaa..39d06434b 100644 --- a/pjmedia/src/pjmedia/transport_srtp.c +++ b/pjmedia/src/pjmedia/transport_srtp.c @@ -1531,13 +1531,14 @@ static void srtp_rtp_cb(pjmedia_tp_cb_param *param) pjmedia_srtp_crypto tx, rx; pj_status_t status; + tx = srtp->tx_policy; + rx = srtp->rx_policy; + /* Stop SRTP first, otherwise srtp_start() will maintain current * roll-over counter. */ pjmedia_transport_srtp_stop((pjmedia_transport*)srtp); - tx = srtp->tx_policy; - rx = srtp->rx_policy; status = pjmedia_transport_srtp_start((pjmedia_transport*)srtp, &tx, &rx); if (status != PJ_SUCCESS) {