Commit ca8e9a58 authored by Martin Vopatek's avatar Martin Vopatek

Fix unprotect when pktlen < (2*mki_size + tag_len)

The condition mki_start_location >= *mki_size in
srtp_get_session_keys() should use base_mki_start_location.
Now the condition is false for packets < 2*mki_size + tag_len.
But as of commit d4bd43c9 the correct condition is now checked
earlier so we simply remove the expression altogether.
parent 06a314e9
......@@ -1563,9 +1563,8 @@ 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,
*mki_size) == 0) {
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