[Asterisk-code-review] chan sip/sdp crypto.c: allow SDP crypto tag to be up to 9 di... (asterisk[11])

Joshua Colp asteriskteam at digium.com
Thu May 21 05:15:18 CDT 2015


Joshua Colp has submitted this change and it was merged.

Change subject: chan_sip/sdp_crypto.c: allow SDP crypto tag to be up to 9 digits
......................................................................


chan_sip/sdp_crypto.c: allow SDP crypto tag to be up to 9 digits

ASTERISK-24887 #close
Reported by: Makoto Dei
Tested by: tensai

Change-Id: I6a96f572adb17f76b3acafe503a01c48eb5dd9bf
---
M channels/sip/sdp_crypto.c
1 file changed, 2 insertions(+), 1 deletion(-)

Approvals:
  Richard Mudgett: Looks good to me, but someone else must approve
  Joshua Colp: Looks good to me, approved; Verified



diff --git a/channels/sip/sdp_crypto.c b/channels/sip/sdp_crypto.c
index c78f473..db5bf99 100644
--- a/channels/sip/sdp_crypto.c
+++ b/channels/sip/sdp_crypto.c
@@ -220,7 +220,8 @@
 		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;
 	}

-- 
To view, visit https://gerrit.asterisk.org/497
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I58e0788b7ba13e853cfc193fe8d3468f1b588329
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: 11
Gerrit-Owner: Corey Edwards <tensai at zmonkey.org>
Gerrit-Reviewer: Corey Edwards <tensai at zmonkey.org>
Gerrit-Reviewer: Jared K. Smith <jaredsmith at jaredsmith.net>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>



More information about the asterisk-code-review mailing list