summaryrefslogtreecommitdiff
path: root/main/sdp_srtp.c
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2015-05-21 05:15:41 -0500
committerGerrit Code Review <gerrit2@gerrit.digium.api>2015-05-21 05:15:41 -0500
commit8983273cc426921c8ec20023a5d5f97afa3dc65f (patch)
tree2780c5121c54be393bfe7478cef8682364919cc4 /main/sdp_srtp.c
parent31f0d78d7b73dfe0e5a59a115bc17aae0c5416e7 (diff)
parentd2e998cd689318667a2a42bf1a6e60e6c3a4793e (diff)
Merge "main/sdp_srtp.c: allow SDP crypto tag to be up to 9 digits"
Diffstat (limited to 'main/sdp_srtp.c')
-rw-r--r--main/sdp_srtp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/main/sdp_srtp.c b/main/sdp_srtp.c
index 4ec9f810e..e576258c3 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;
}