1
0
Fork 0
mirror of https://github.com/VSadov/Satori.git synced 2025-06-11 18:20:26 +09:00

[mono][debugger] Fixing AV on accessing source_file_list that is NULL (#105781)

* Fixing AV on accessing source_file_list that is NULL
This commit is contained in:
Thays Grazia 2024-08-01 14:25:57 -03:00 committed by GitHub
parent be32947d32
commit 9fe8c95c89
Signed by: github
GPG key ID: B5690EEEBB952194

View file

@ -6752,16 +6752,18 @@ get_source_files_for_type (MonoClass *klass)
if (minfo) {
mono_debug_get_seq_points (minfo, NULL, &source_file_list, NULL, NULL, NULL);
for (guint j = 0; j < source_file_list->len; ++j) {
guint i;
sinfo = (MonoDebugSourceInfo *)g_ptr_array_index (source_file_list, j);
for (i = 0; i < files->len; ++i)
if (!strcmp ((const char*)g_ptr_array_index (files, i), (const char*)sinfo->source_file))
break;
if (i == files->len)
g_ptr_array_add (files, g_strdup (sinfo->source_file));
if (source_file_list != NULL) {
for (guint j = 0; j < source_file_list->len; ++j) {
guint i;
sinfo = (MonoDebugSourceInfo *)g_ptr_array_index (source_file_list, j);
for (i = 0; i < files->len; ++i)
if (!strcmp ((const char*)g_ptr_array_index (files, i), (const char*)sinfo->source_file))
break;
if (i == files->len)
g_ptr_array_add (files, g_strdup (sinfo->source_file));
}
g_ptr_array_free (source_file_list, TRUE);
}
g_ptr_array_free (source_file_list, TRUE);
}
}