diff options
author | Corey Edwards <tensai@zmonkey.org> | 2015-05-19 12:01:36 -0600 |
---|---|---|
committer | Corey Edwards <tensai@zmonkey.org> | 2015-05-19 13:12:54 -0500 |
commit | d2e998cd689318667a2a42bf1a6e60e6c3a4793e (patch) | |
tree | c8a55b898df8d3f831c1bbcb55782b2a3fc92c83 /main | |
parent | 908c6a51d69c84f790633e64d72a2f09037bd6cd (diff) |
main/sdp_srtp.c: allow SDP crypto tag to be up to 9 digits
ASTERISK-24887 #close
Reported by: Makoto Dei
Tested by: tensai
Change-Id: I6a96f572adb17f76b3acafe503a01c48eb5dd9bf
Diffstat (limited to 'main')
-rw-r--r-- | main/sdp_srtp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/main/sdp_srtp.c b/main/sdp_srtp.c index 8c86f1407..5d8047ca3 100644 --- a/main/sdp_srtp.c +++ b/main/sdp_srtp.c @@ -238,7 +238,8 @@ int ast_sdp_crypto_process(struct ast_rtp_instance *rtp, struct ast_sdp_srtp *sr return -1; } - if (sscanf(tag, "%30d", &crypto->tag) != 1 || crypto->tag <= 0 || crypto->tag > 9) { + /* RFC4568 9.1 - tag is 1-9 digits, greater than zero */ + if (sscanf(tag, "%30d", &crypto->tag) != 1 || crypto->tag <= 0 || crypto->tag > 999999999) { ast_log(LOG_WARNING, "Unacceptable a=crypto tag: %s\n", tag); return -1; } |