Unverified Commit ae52e44a authored by Pascal Bühler's avatar Pascal Bühler Committed by GitHub

Merge pull request #406 from vopatek/fix-unprotect-mki

Fix unprotect when pktlen < (2*mki_size + tag_len)
parents 06a314e9 ab6cd88a
......@@ -1563,8 +1563,7 @@ srtp_session_keys_t *srtp_get_session_keys(srtp_stream_ctx_t *stream,
*mki_size = stream->session_keys[i].mki_size;
mki_start_location = base_mki_start_location - *mki_size;
if (mki_start_location >= *mki_size &&
memcmp(hdr + mki_start_location, stream->session_keys[i].mki_id,
if (memcmp(hdr + mki_start_location, stream->session_keys[i].mki_id,
*mki_size) == 0) {
return &stream->session_keys[i];
}
......
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