diff options
Diffstat (limited to 'main/sdp_srtp.c')
-rw-r--r-- | main/sdp_srtp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/main/sdp_srtp.c b/main/sdp_srtp.c index 8c86f1407..e576258c3 100644 --- a/main/sdp_srtp.c +++ b/main/sdp_srtp.c @@ -16,7 +16,7 @@ * at the top of the source tree. */ -/*! \file ast_sdp_crypto.c +/*! \file * * \brief SRTP and SDP Security descriptions * @@ -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; } |