From 3f3025aa794fbdad01150af9401bcb708263488f Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= Date: Thu, 17 May 2007 17:36:59 +0000 Subject: [PATCH] Fix incorrect hash size limit --- libs/srtp/srtp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/srtp/srtp.c b/libs/srtp/srtp.c index efc434fdd8..ec303da83a 100644 --- a/libs/srtp/srtp.c +++ b/libs/srtp/srtp.c @@ -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)) -- 2.39.2