Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
CajaFile: fix crash in modify_link_hash_table
We crash in g_hash_table_lookup_extended if the file's symlink_name is
set but the file is not a symlink, since the hash function (g_str_hash)
does not allow NULL values but target_uri is NULL.

https://bugzilla.gnome.org/show_bug.cgi?id=711583
Adapted from https://gitlab.gnome.org/GNOME/nautilus/commit/c2a5e052
  • Loading branch information
mcatanzaro authored and lukefromdc committed Nov 2, 2018
1 parent ae033ba commit d8d375b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libcaja-private/caja-file.c
Expand Up @@ -555,7 +555,7 @@ modify_link_hash_table (CajaFile *file,
GList **list_ptr;

/* Check if there is a symlink name. If none, we are OK. */
if (file->details->symlink_name == NULL) {
if (file->details->symlink_name == NULL || !caja_file_is_symbolic_link (file)) {
return;
}

Expand Down

0 comments on commit d8d375b

Please sign in to comment.