Skip to content

Commit

Permalink
freevxfs: ensure fast symlinks are NUL-terminated
Browse files Browse the repository at this point in the history
Ensure fast symlink targets are NUL-terminated, even if corrupted
on-disk.

Cc: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Duane Griffin <duaneg@dghda.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Duane Griffin authored and Al Viro committed Dec 31, 2008
1 parent 21acaf8 commit a63d0ff
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fs/freevxfs/vxfs_inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -325,8 +325,10 @@ vxfs_iget(struct super_block *sbp, ino_t ino)
if (!VXFS_ISIMMED(vip)) {
ip->i_op = &page_symlink_inode_operations;
ip->i_mapping->a_ops = &vxfs_aops;
} else
} else {
ip->i_op = &vxfs_immed_symlink_iops;
vip->vii_immed.vi_immed[ip->i_size] = '\0';
}
} else
init_special_inode(ip, ip->i_mode, old_decode_dev(vip->vii_rdev));

Expand Down

0 comments on commit a63d0ff

Please sign in to comment.