[asterisk-commits] srtp: Allow zero as tag value for a sRTP Crypto Suite. (asterisk[13])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Mar 29 19:00:48 CDT 2017


Joshua Colp has submitted this change and it was merged. ( https://gerrit.asterisk.org/5356 )

Change subject: srtp: Allow zero as tag value for a sRTP Crypto Suite.
......................................................................


srtp: Allow zero as tag value for a sRTP Crypto Suite.

ASTERISK-25490 #close

Change-Id: I1c5fc0942c33c96d62b24203aad0f1e1a1a0131f
---
M main/sdp_srtp.c
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  George Joseph: Looks good to me, but someone else must approve
  Anonymous Coward #1000019: Verified
  Sean Bright: Looks good to me, but someone else must approve
  Joshua Colp: Looks good to me, approved



diff --git a/main/sdp_srtp.c b/main/sdp_srtp.c
index d77d463..3d1d850 100644
--- a/main/sdp_srtp.c
+++ b/main/sdp_srtp.c
@@ -238,8 +238,8 @@
 		return -1;
 	}
 
-	/* RFC4568 9.1 - tag is 1-9 digits, greater than zero */
-	if (sscanf(tag, "%30d", &crypto->tag) != 1 || crypto->tag <= 0 || crypto->tag > 999999999) {
+	/* RFC4568 9.1 - tag is 1-9 digits */
+	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;
 	}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1c5fc0942c33c96d62b24203aad0f1e1a1a0131f
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Alexander Traud <pabstraud at compuserve.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Sean Bright <sean.bright at gmail.com>



More information about the asterisk-commits mailing list