diff options
author | Zhihao Cheng <chengzhihao1@huawei.com> | 2020-06-16 10:11:44 +0300 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2020-12-14 00:12:32 +0300 |
commit | a33e30a0e023e9d1866866ca895c7789f48445e7 (patch) | |
tree | 383b2fd9b04365a17ed31c4b624d278cf8e23607 /fs/ubifs/sb.c | |
parent | c8be097530a82e004f98378c3afc5cd35efc4f57 (diff) | |
download | linux-a33e30a0e023e9d1866866ca895c7789f48445e7.tar.xz |
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/sb.c')
-rw-r--r-- | fs/ubifs/sb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ubifs/sb.c b/fs/ubifs/sb.c index c0d3e4008d23..c160f718c288 100644 --- a/fs/ubifs/sb.c +++ b/fs/ubifs/sb.c @@ -503,7 +503,7 @@ static int validate_sb(struct ubifs_info *c, struct ubifs_sb_node *sup) failed: ubifs_err(c, "bad superblock, error %d", err); - ubifs_dump_node(c, sup); + ubifs_dump_node(c, sup, ALIGN(UBIFS_SB_NODE_SZ, c->min_io_size)); return -EINVAL; } |