From 3bc2758d51ad7a3fe9834e8bb61d14ee53004f90 Mon Sep 17 00:00:00 2001 From: jdgleaver Date: Wed, 28 Apr 2021 17:52:15 +0100 Subject: [PATCH] (core_info) Prevent potential hash collisions when searching for cores --- core_info.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core_info.c b/core_info.c index a2a6b1b5f3..50bb7b3bc7 100644 --- a/core_info.c +++ b/core_info.c @@ -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; }