mirror of
https://github.com/MidnightCommander/mc
synced 2025-02-09 11:54:12 +03:00
(tar_skip_member): fix NULL dereference.
Found by Coverity. Coverity id #462418. Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
54ec89d950
commit
e8e9d222a9
@ -293,11 +293,14 @@ tar_skip_member (tar_super_t * archive, struct vfs_s_inode *inode)
|
|||||||
|
|
||||||
(void) tar_sparse_skip_file (archive, ¤t_stat_info);
|
(void) tar_sparse_skip_file (archive, ¤t_stat_info);
|
||||||
|
|
||||||
/* use vfs_s_inode::user_data to keep the sparse map */
|
if (inode != NULL)
|
||||||
inode->user_data = current_stat_info.sparse_map;
|
{
|
||||||
current_stat_info.sparse_map = NULL;
|
/* use vfs_s_inode::user_data to keep the sparse map */
|
||||||
|
inode->user_data = current_stat_info.sparse_map;
|
||||||
|
current_stat_info.sparse_map = NULL;
|
||||||
|
|
||||||
tar_calc_sparse_offsets (inode);
|
tar_calc_sparse_offsets (inode);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (save_typeflag != DIRTYPE)
|
else if (save_typeflag != DIRTYPE)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user