From: Corey Edwards Date: Tue, 19 May 2015 18:01:36 +0000 (-0600) Subject: main/sdp_srtp.c: allow SDP crypto tag to be up to 9 digits X-Git-Tag: 13.4.0-rc1~16^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=17d6ede337439fe84e4f9efa7b65eb4ceaace0c1;p=thirdparty%2Fasterisk.git 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 --- diff --git a/main/sdp_srtp.c b/main/sdp_srtp.c index fee3fea56c..2c49fd240d 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; }