Skip to content

Commit

Permalink
FreeBSD -Thunar crash due to passing null to strcmp()
Browse files Browse the repository at this point in the history
(Bug #15059)
  • Loading branch information
Roy Richardson authored and Alexander Schwinn committed Jan 19, 2019
1 parent ed64759 commit d952139
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions thunar/thunar-file.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d952139

Please sign in to comment.