mirror of
https://github.com/MidnightCommander/mc
synced 2025-02-03 17:07:00 +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,12 +293,15 @@ tar_skip_member (tar_super_t * archive, struct vfs_s_inode *inode)
|
||||
|
||||
(void) tar_sparse_skip_file (archive, ¤t_stat_info);
|
||||
|
||||
if (inode != 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);
|
||||
}
|
||||
}
|
||||
else if (save_typeflag != DIRTYPE)
|
||||
{
|
||||
if (inode != NULL)
|
||||
|
Loading…
x
Reference in New Issue
Block a user