mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-01 10:45:49 +00:00
hfsplus: fix potential overflow in hfsplus_file_truncate()
commit 12f267a20a
upstream.
Change a u32 to loff_t hfsplus_file_truncate().
Signed-off-by: Vyacheslav Dubeyko <slava@dubeyko.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Hin-Tak Leung <htl10@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
aab5c5ca24
commit
7c72cbc040
@ -499,7 +499,7 @@ void hfsplus_file_truncate(struct inode *inode)
|
||||
struct address_space *mapping = inode->i_mapping;
|
||||
struct page *page;
|
||||
void *fsdata;
|
||||
u32 size = inode->i_size;
|
||||
loff_t size = inode->i_size;
|
||||
int res;
|
||||
|
||||
res = pagecache_write_begin(NULL, mapping, size, 0,
|
||||
|
Loading…
Reference in New Issue
Block a user