[Asterisk-code-review] srtp: Allow zero as tag value for a sRTP Crypto Suite. (asterisk[14])

Alexander Traud asteriskteam at digium.com
Wed Mar 29 08:27:18 CDT 2017


Alexander Traud has uploaded a new change for review. ( https://gerrit.asterisk.org/5355 )

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 res/res_srtp.c
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/55/5355/1

diff --git a/res/res_srtp.c b/res/res_srtp.c
index 1fb16ce..dfe67c9 100644
--- a/res/res_srtp.c
+++ b/res/res_srtp.c
@@ -784,8 +784,8 @@
 		return -1;
 	}
 
-	/* RFC4568 9.1 - tag is 1-9 digits, greater than zero */
-	if (sscanf(tag, "%30d", &tag_from_sdp) != 1 || tag_from_sdp <= 0 || tag_from_sdp > 999999999) {
+	/* RFC4568 9.1 - tag is 1-9 digits */
+	if (sscanf(tag, "%30d", &tag_from_sdp) != 1 || tag_from_sdp < 0 || tag_from_sdp > 999999999) {
 		ast_log(LOG_WARNING, "Unacceptable a=crypto tag: %s\n", tag);
 		return -1;
 	}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1c5fc0942c33c96d62b24203aad0f1e1a1a0131f
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 14
Gerrit-Owner: Alexander Traud <pabstraud at compuserve.com>



More information about the asterisk-code-review mailing list