From: Alexander Traud Date: Wed, 29 Mar 2017 13:27:01 +0000 (+0200) Subject: srtp: Allow zero as tag value for a sRTP Crypto Suite. X-Git-Tag: 13.16.0-rc1~72^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ef19db92615f8f29604e0df2ec78036bd003cdfa;p=thirdparty%2Fasterisk.git srtp: Allow zero as tag value for a sRTP Crypto Suite. ASTERISK-25490 #close Change-Id: I1c5fc0942c33c96d62b24203aad0f1e1a1a0131f --- diff --git a/main/sdp_srtp.c b/main/sdp_srtp.c index d77d4630d3..3d1d850397 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; }