From e33a48fc95b0be368830ea24728cc8da5faa27c0 Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Sun, 20 Apr 2014 18:55:38 +0400 Subject: [PATCH] (tar_read_header): fix dereference of null pointer. Signed-off-by: Andrew Borodin --- src/vfs/tar/tar.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/vfs/tar/tar.c b/src/vfs/tar/tar.c index 07206fc8e..29057fdf3 100644 --- a/src/vfs/tar/tar.c +++ b/src/vfs/tar/tar.c @@ -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; }