Merge pull request #12334 from jdgleaver/core-info-hash-collision

(core_info) Prevent potential hash collisions when searching for cores
This commit is contained in:
Autechre 2021-04-28 22:09:41 +02:00 committed by GitHub
commit b2faff6bf9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -106,7 +106,8 @@ static core_info_t *core_info_find_internal(
{
core_info_t *info = &list->list[i];
if (info->core_file_id.hash == hash)
if ((info->core_file_id.hash == hash) &&
string_is_equal(info->core_file_id.str, core_file_id))
return info;
}