]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
srtp: Allow zero as tag value for a sRTP Crypto Suite.
authorAlexander Traud <pabstraud@compuserve.com>
Wed, 29 Mar 2017 13:04:05 +0000 (15:04 +0200)
committerAlexander Traud <pabstraud@compuserve.com>
Wed, 29 Mar 2017 13:27:17 +0000 (07:27 -0600)
ASTERISK-25490 #close

Change-Id: I1c5fc0942c33c96d62b24203aad0f1e1a1a0131f

res/res_srtp.c

index 1fb16ce6b9486f06fc49fdd70dfc1a80b8169ac6..dfe67c9207103acd60d4b51a4a004040488e38e0 100644 (file)
@@ -784,8 +784,8 @@ static int res_sdp_crypto_parse_offer(struct ast_rtp_instance *rtp, struct ast_s
                return -1;
        }
 
-       /* RFC4568 9.1 - tag is 1-9 digits, greater than zero */
-       if (sscanf(tag, "%30d", &tag_from_sdp) != 1 || tag_from_sdp <= 0 || tag_from_sdp > 999999999) {
+       /* RFC4568 9.1 - tag is 1-9 digits */
+       if (sscanf(tag, "%30d", &tag_from_sdp) != 1 || tag_from_sdp < 0 || tag_from_sdp > 999999999) {
                ast_log(LOG_WARNING, "Unacceptable a=crypto tag: %s\n", tag);
                return -1;
        }