Skip to content

Commit

Permalink
Merge branch '4561_tar_segfault'
Browse files Browse the repository at this point in the history
* 4561_tar_segfault:
  Ticket #4561: tar: fix segault on copy fiiles from archive.
  • Loading branch information
aborodin committed Jul 15, 2024
2 parents b68243d + ffdb057 commit 9f4e88f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/vfs/tar/tar.c
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,6 @@ tar_read_header (struct vfs_class *me, struct vfs_s_super *archive)
}

tar_assign_string_dup (&current_stat_info.orig_file_name, file_name);
canonicalize_pathname (file_name);
tar_assign_string (&current_stat_info.file_name, file_name);

g_free (recent_long_link);
Expand Down Expand Up @@ -817,6 +816,9 @@ tar_read_header (struct vfs_class *me, struct vfs_s_super *archive)
current_stat_info.is_dumpdir = TRUE;
}

/* Do this after decoding of all headers occupied with long file/directory name. */
canonicalize_pathname (current_stat_info.file_name);

status = tar_insert_entry (me, archive, header, &inode);
if (status != HEADER_SUCCESS)
{
Expand Down

0 comments on commit 9f4e88f

Please sign in to comment.