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

Merge pull request #401 from mfroeschl/fix-srtp-get-session-keys

Fix memory access issue in srtp_get_session_keys()
parents 2761dacf d4bd43c9
......@@ -1604,7 +1604,8 @@ srtp_session_keys_t *srtp_get_session_keys(srtp_stream_ctx_t *stream,
base_mki_start_location -= tag_len;
for (i = 0; i < stream->num_master_keys; i++) {
if (stream->session_keys[i].mki_size != 0) {
if (stream->session_keys[i].mki_size != 0 &&
stream->session_keys[i].mki_size <= base_mki_start_location) {
*mki_size = stream->session_keys[i].mki_size;
mki_start_location = base_mki_start_location - *mki_size;
......
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