Commit 3f3025aa authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Fix incorrect hash size limit

parent b0f45973
......@@ -208,7 +208,7 @@ srtp_create (int encr, int auth, unsigned tag_len, int prf, unsigned flags)
return NULL;
}
if (tag_len > gcry_md_get_algo_dlen (auth))
if (tag_len > gcry_md_get_algo_dlen (md))
return NULL;
if (prf != SRTP_PRF_AES_CM)
......@@ -331,6 +331,7 @@ srtp_derive (srtp_session_t *s, const void *key, size_t keylen,
|| gcry_cipher_setkey (prf, key, keylen))
return -1;
#if 0
/* RTP key derivation */
if (s->kdr != 0)
{
......@@ -344,6 +345,7 @@ srtp_derive (srtp_session_t *s, const void *key, size_t keylen,
}
}
else
#endif
memset (r, 0, sizeof (r));
if (proto_derive (&s->rtp, prf, salt, saltlen, r, 6, false))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment