summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2017-03-29 19:00:47 -0500
committerGerrit Code Review <gerrit2@gerrit.digium.api>2017-03-29 19:00:47 -0500
commit5d3db15d2eea8f8741c2d6d008497b792905cdd8 (patch)
tree27d328a288c984edef465bba52b43374a533aa12
parent8e0d8cdf08e882f0b5c76f989eaf491860f8bd61 (diff)
parentef19db92615f8f29604e0df2ec78036bd003cdfa (diff)
Merge "srtp: Allow zero as tag value for a sRTP Crypto Suite." into 13
-rw-r--r--main/sdp_srtp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/main/sdp_srtp.c b/main/sdp_srtp.c
index d77d4630d..3d1d85039 100644
--- a/main/sdp_srtp.c
+++ b/main/sdp_srtp.c
@@ -238,8 +238,8 @@ int ast_sdp_crypto_process(struct ast_rtp_instance *rtp, struct ast_sdp_srtp *sr
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;
}