MT#55283 fix sdes_accept logic booboo

Using `l->next` as a test for whether only one element is left in the
list is not reliable. Use the actual list length instead.

Update one affected test.

Closes #1961

Change-Id: I5773715700220cd762e61090bac941ddd33afd9b
(cherry picked from commit 02897ccb46)
(cherry picked from commit b38f4d81ce)
mr12.5.1
Richard Fuchs 7 months ago
parent 3d975ec5b9
commit e8b2e478d7

@ -1955,10 +1955,8 @@ static void __sdes_accept(struct call_media *media, const sdp_ng_flags *flags) {
/* stop the iteration intentionally, if only one suite is left
* this helps with a case, when the offerer left with no suites,
* which can be allowed, but we need to still have at least something */
if (l->next == NULL) {
l = l->prev;
if (media->sdes_in.length == 1)
break;
}
ilogs(crypto, LOG_DEBUG, "Dropping offered crypto suite '%s' from offer due to %s",
offered_cps->params.crypto_suite->name,

@ -19769,7 +19769,7 @@ c=IN IP4 203.0.113.1
a=rtpmap:0 PCMU/8000
a=sendrecv
a=rtcp:PORT
a=crypto:4 AES_256_CM_HMAC_SHA1_32 inline:CRYPTO256
a=crypto:3 AES_256_CM_HMAC_SHA1_80 inline:2GLk3p/csdno4KlGO1TxCVaEt+bifmDlQ5NjnCb5cJYPURiGRSTBEtEq37db8g
SDP

Loading…
Cancel
Save