]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
chan_sip/sdp_crypto.c: allow SDP crypto tag to be up to 9 digits 97/497/2
authorCorey Edwards <tensai@zmonkey.org>
Wed, 20 May 2015 19:45:37 +0000 (13:45 -0600)
committerCorey Edwards <tensai@zmonkey.org>
Wed, 20 May 2015 22:03:22 +0000 (17:03 -0500)
ASTERISK-24887 #close
Reported by: Makoto Dei
Tested by: tensai

Change-Id: I6a96f572adb17f76b3acafe503a01c48eb5dd9bf

channels/sip/sdp_crypto.c

index c78f473b24356147c4858dd444fdd004408d98ce..db5bf9911d6b6d23e6db8d00e897ae2c241139ee 100644 (file)
@@ -220,7 +220,8 @@ int sdp_crypto_process(struct sdp_crypto *p, const char *attr, struct ast_rtp_in
                return -1;
        }
 
-       if (sscanf(tag, "%30d", &p->tag) != 1 || p->tag <= 0 || p->tag > 9) {
+       /* RFC4568 9.1 - tag is 1-9 digits, greater than zero */
+       if (sscanf(tag, "%30d", &p->tag) != 1 || p->tag <= 0 || p->tag > 999999999) {
                ast_log(LOG_WARNING, "Unacceptable a=crypto tag: %s\n", tag);
                return -1;
        }