summaryrefslogtreecommitdiff
path: root/net-libs/libsrtp/files/libsrtp-2.3.0-rtp-header.patch
blob: 096b19e8f344fd9bcef7e036c0d19cd64b8945fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
From 55299517f39e2e1a34df05c27cbc9898071ac9db Mon Sep 17 00:00:00 2001
From: Lennart Grahl <lennart.grahl@gmail.com>
Date: Mon, 18 May 2020 18:01:08 +0200
Subject: [PATCH] Fix two-byte RTP header extension encryption

Also ignores the application bits as required by RFC 8285, sec 4.3
Fixes #490
---
 srtp/srtp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srtp/srtp.c b/srtp/srtp.c
index b45cee0f..176b01f0 100644
--- a/srtp/srtp.c
+++ b/srtp/srtp.c
@@ -1423,7 +1423,7 @@ static srtp_err_status_t srtp_process_header_encryption(
                 xtn_hdr_data++;
             }
         }
-    } else if ((ntohs(xtn_hdr->profile_specific) & 0x1fff) == 0x100) {
+    } else if ((ntohs(xtn_hdr->profile_specific) & 0xfff0) == 0x1000) {
         /* RFC 5285, section 4.3. Two-Byte Header */
         while (xtn_hdr_data + 1 < xtn_hdr_end) {
             uint8_t xid = *xtn_hdr_data;