srtp: use SRTP_SRCTP_INDEX_LEN define from libsrtp 2.6.0
BUG=webrtc:42222036 Change-Id: Ibf5c6b200501c114b9709b76685bb0ecd30bf9fb Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/359627 Commit-Queue: Philipp Hancke <phancke@meta.com> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Reviewed-by: Henrik Boström <hbos@webrtc.org> Cr-Commit-Position: refs/heads/main@{#43538}
This commit is contained in:
parent
afe5d2f758
commit
7738bc23ed
@ -249,7 +249,7 @@ bool SrtpSession::ProtectRtcp(void* p, int in_len, int max_len, int* out_len) {
|
||||
// SRTP_MAX_TRAILER_LEN bytes of free space after the data. WebRTC
|
||||
// never includes a MKI, therefore the amount of bytes added by the
|
||||
// srtp_protect_rtp call is known in advance and depends on the cipher suite.
|
||||
int need_len = in_len + sizeof(uint32_t) + rtcp_auth_tag_len_; // NOLINT
|
||||
int need_len = in_len + SRTP_SRCTP_INDEX_LEN + rtcp_auth_tag_len_;
|
||||
if (max_len < need_len) {
|
||||
RTC_LOG(LS_WARNING) << "Failed to protect SRTCP packet: The buffer length "
|
||||
<< max_len << " is less than the needed " << need_len;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user