mirror of https://github.com/MidnightCommander/mc
Merge branch '4561_tar_segfault'
* 4561_tar_segfault: Ticket #4561: tar: fix segault on copy fiiles from archive.
This commit is contained in:
commit
9f4e88fd70
|
@ -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);
|
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);
|
tar_assign_string (¤t_stat_info.file_name, file_name);
|
||||||
|
|
||||||
g_free (recent_long_link);
|
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;
|
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);
|
status = tar_insert_entry (me, archive, header, &inode);
|
||||||
if (status != HEADER_SUCCESS)
|
if (status != HEADER_SUCCESS)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue