From f8e104d43376d8a3b720059b867dfea2a29dba46 Mon Sep 17 00:00:00 2001 From: Pierre Bodilis Date: Thu, 2 May 2024 17:44:37 +0200 Subject: [PATCH 1/2] [code] fix endianness issue while updating srtp keys https://github.com/cisco/libsrtp/issues/710 --- srtp/srtp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srtp/srtp.c b/srtp/srtp.c index 0189fae94..e60073fa8 100644 --- a/srtp/srtp.c +++ b/srtp/srtp.c @@ -3111,7 +3111,7 @@ static bool update_template_stream_cb(srtp_stream_t stream, void *raw_data) old_rtcp_rdb = stream->rtcp_rdb; /* remove stream */ - data->status = srtp_stream_remove(session, ssrc); + data->status = srtp_stream_remove(session, ntohl(ssrc)); if (data->status) { return false; } From 75d2a8cecd7b6ee81b7cc6bfc92301481da87d19 Mon Sep 17 00:00:00 2001 From: Pierre Bodilis Date: Fri, 3 May 2024 10:11:23 +0200 Subject: [PATCH 2/2] [code] remove unecessary htonl as srtp_stream_remove now expect an ssrc in host order --- srtp/srtp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srtp/srtp.c b/srtp/srtp.c index a7ca8e0b8..bf91ce89a 100644 --- a/srtp/srtp.c +++ b/srtp/srtp.c @@ -3247,7 +3247,7 @@ static srtp_err_status_t stream_update(srtp_t session, old_index = stream->rtp_rdbx.index; old_rtcp_rdb = stream->rtcp_rdb; - status = srtp_stream_remove(session, htonl(policy->ssrc.value)); + status = srtp_stream_remove(session, policy->ssrc.value); if (status) { return status; }