mirror of
https://github.com/adulau/aha.git
synced 2024-12-27 19:26:25 +00:00
ext2: Zero our b_size in ext2_quota_read()
ext2_quota_read() doesn't initialize tmp_bh.b_size before calling ext2_get_block() where we access it. Since it is a local variable it might contain some garbage. Make sure it is filled with reasonable value before passing. Signed-off-by: Manish Katiyar <mkatiyar@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz>
This commit is contained in:
parent
620372a9ff
commit
c16831b4cc
1 changed files with 1 additions and 0 deletions
|
@ -1331,6 +1331,7 @@ static ssize_t ext2_quota_read(struct super_block *sb, int type, char *data,
|
|||
sb->s_blocksize - offset : toread;
|
||||
|
||||
tmp_bh.b_state = 0;
|
||||
tmp_bh.b_size = sb->s_blocksize;
|
||||
err = ext2_get_block(inode, blk, &tmp_bh, 0);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
|
Loading…
Reference in a new issue