From d9521391850478ec569c563f7768b58174aa4f4a Mon Sep 17 00:00:00 2001 From: Roy Richardson Date: Sat, 19 Jan 2019 22:53:14 +0100 Subject: [PATCH] FreeBSD -Thunar crash due to passing null to strcmp() (Bug #15059) --- thunar/thunar-file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/thunar/thunar-file.c b/thunar/thunar-file.c index 5194b6640..d9147aa71 100644 --- a/thunar/thunar-file.c +++ b/thunar/thunar-file.c @@ -4144,11 +4144,11 @@ thunar_file_compare_by_name (const ThunarFile *file_a, /* case insensitive checking */ if (G_LIKELY (!case_sensitive)) - result = strcmp (file_a->collate_key_nocase, file_b->collate_key_nocase); + result = g_strcmp0 (file_a->collate_key_nocase, file_b->collate_key_nocase); /* fall-back to case sensitive */ if (result == 0) - result = strcmp (file_a->collate_key, file_b->collate_key); + result = g_strcmp0 (file_a->collate_key, file_b->collate_key); /* this happens in the trash */ if (result == 0)