diff options
author | Zhihao Cheng <chengzhihao1@huawei.com> | 2020-06-16 15:11:44 +0800 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2020-12-13 22:12:32 +0100 |
commit | a33e30a0e023e9d1866866ca895c7789f48445e7 (patch) | |
tree | 383b2fd9b04365a17ed31c4b624d278cf8e23607 /fs/ubifs/super.c | |
parent | c8be097530a82e004f98378c3afc5cd35efc4f57 (diff) | |
download | linux-a33e30a0e023e9d1866866ca895c7789f48445e7.tar.gz linux-a33e30a0e023e9d1866866ca895c7789f48445e7.tar.bz2 linux-a33e30a0e023e9d1866866ca895c7789f48445e7.zip |
ubifs: Pass node length in all node dumping callers
Function ubifs_dump_node() has been modified to avoid memory oob
accessing while dumping node, node length (corresponding to the
size of allocated memory for node) should be passed into all node
dumping callers.
Signed-off-by: Zhihao Cheng <chengzhihao1@huawei.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'fs/ubifs/super.c')
-rw-r--r-- | fs/ubifs/super.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c index 77dea673851b..138b9426c6c1 100644 --- a/fs/ubifs/super.c +++ b/fs/ubifs/super.c @@ -253,7 +253,7 @@ struct inode *ubifs_iget(struct super_block *sb, unsigned long inum) out_invalid: ubifs_err(c, "inode %lu validation failed, error %d", inode->i_ino, err); - ubifs_dump_node(c, ino); + ubifs_dump_node(c, ino, UBIFS_MAX_INO_NODE_SZ); ubifs_dump_inode(c, inode); err = -EINVAL; out_ino: |