mirror of
https://github.com/chatmail/core.git
synced 2026-05-22 16:26:31 +03:00
check bounds before accessing Vec
This commit is contained in:
@@ -1724,7 +1724,7 @@ fn search_chat_ids_by_contact_ids(context: &Context, unsorted_contact_ids: &Vec<
|
|||||||
matches = 0;
|
matches = 0;
|
||||||
mismatches = 0;
|
mismatches = 0;
|
||||||
}
|
}
|
||||||
if contact_id == contact_ids[matches] {
|
if matches < contact_ids.len() && contact_id == contact_ids[matches] {
|
||||||
matches += 1;
|
matches += 1;
|
||||||
} else {
|
} else {
|
||||||
mismatches += 1;
|
mismatches += 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user