mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 12:32:40 +03:00
Ticket #4561: tar: fix segault on copy fiiles from archive.
* (tar_read_header): canonicalize path name after decoding of all headers occupied with long file/directory name. Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
b68243df1e
commit
ffdb057e5b
@ -773,7 +773,6 @@ tar_read_header (struct vfs_class *me, struct vfs_s_super *archive)
|
||||
}
|
||||
|
||||
tar_assign_string_dup (¤t_stat_info.orig_file_name, file_name);
|
||||
canonicalize_pathname (file_name);
|
||||
tar_assign_string (¤t_stat_info.file_name, file_name);
|
||||
|
||||
g_free (recent_long_link);
|
||||
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user