mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/shaggy/jfs-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/shaggy/jfs-2.6: jfs: ensure symlinks are NUL-terminated
This commit is contained in:
commit
14eeee88bf
1 changed files with 7 additions and 1 deletions
|
@ -59,8 +59,14 @@ struct inode *jfs_iget(struct super_block *sb, unsigned long ino)
|
|||
if (inode->i_size >= IDATASIZE) {
|
||||
inode->i_op = &page_symlink_inode_operations;
|
||||
inode->i_mapping->a_ops = &jfs_aops;
|
||||
} else
|
||||
} else {
|
||||
inode->i_op = &jfs_symlink_inode_operations;
|
||||
/*
|
||||
* The inline data should be null-terminated, but
|
||||
* don't let on-disk corruption crash the kernel
|
||||
*/
|
||||
JFS_IP(inode)->i_inline[inode->i_size] = '\0';
|
||||
}
|
||||
} else {
|
||||
inode->i_op = &jfs_file_inode_operations;
|
||||
init_special_inode(inode, inode->i_mode, inode->i_rdev);
|
||||
|
|
Loading…
Reference in a new issue