]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
res_rtp_asterisk.c: Don't truncate spec-compliant `ice-ufrag` or `ice-pwd`.
authorSean Bright <sean@seanbright.com>
Fri, 7 Mar 2025 16:32:00 +0000 (11:32 -0500)
committerAsterisk Development Team <asteriskteam@digium.com>
Thu, 20 Mar 2025 18:29:21 +0000 (18:29 +0000)
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)

res/res_rtp_asterisk.c

index df9c012fac21c1c69cdb41f11483d27443e6a8cf..b94a0fb40ede58b72e6ff3c135f9cdda115e20b5 100644 (file)
@@ -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 */