From: Sean Bright Date: Fri, 7 Mar 2025 16:32:00 +0000 (-0500) Subject: res_rtp_asterisk.c: Don't truncate spec-compliant `ice-ufrag` or `ice-pwd`. X-Git-Tag: 21.8.0-rc1~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=025bb89e515272c1f9f48b845779484d807a47a2;p=thirdparty%2Fasterisk.git res_rtp_asterisk.c: Don't truncate spec-compliant `ice-ufrag` or `ice-pwd`. RFC 8839[1] indicates that the `ice-ufrag` and `ice-pwd` attributes can be up to 256 bytes long. While we don't generate values of that size, we should be able to accomodate them without truncating. 1. https://www.rfc-editor.org/rfc/rfc8839#name-ice-ufrag-and-ice-pwd-attri (cherry picked from commit 3a9d7438e05695cb29e169df773f5d3a6debd517) --- diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c index df9c012fac..b94a0fb40e 100644 --- a/res/res_rtp_asterisk.c +++ b/res/res_rtp_asterisk.c @@ -495,11 +495,11 @@ struct ast_rtp { struct ast_rtp_ioqueue_thread *ioqueue; /*!< The ioqueue thread handling us */ - char remote_ufrag[256]; /*!< The remote ICE username */ - char remote_passwd[256]; /*!< The remote ICE password */ + char remote_ufrag[257]; /*!< The remote ICE username */ + char remote_passwd[257]; /*!< The remote ICE password */ - char local_ufrag[256]; /*!< The local ICE username */ - char local_passwd[256]; /*!< The local ICE password */ + char local_ufrag[257]; /*!< The local ICE username */ + char local_passwd[257]; /*!< The local ICE password */ struct ao2_container *ice_local_candidates; /*!< The local ICE candidates */ struct ao2_container *ice_active_remote_candidates; /*!< The remote ICE candidates */