Skip to content

Commit d8d375b

Browse files
mcatanzarolukefromdc
authored andcommitted
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
1 parent ae033ba commit d8d375b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎libcaja-private/caja-file.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ modify_link_hash_table (CajaFile *file,
555555
GList **list_ptr;
556556

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

0 commit comments

Comments
 (0)