(tar_read_header): fix dereference of null pointer.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2014-04-20 18:55:38 +04:00
parent c9d9a8ba93
commit e33a48fc95
1 changed files with 3 additions and 1 deletions

View File

@ -737,7 +737,9 @@ tar_read_header (struct vfs_class *me, struct vfs_s_super *archive, int tard, si
{
while (tar_get_next_record (archive, tard)->ext_hdr.isextended != 0)
;
inode->data_offset = current_tar_position;
if (inode != NULL)
inode->data_offset = current_tar_position;
}
return STATUS_SUCCESS;
}