From: Vyacheslav Dubeyko Date: Wed, 17 Apr 2013 22:58:33 +0000 (-0700) Subject: hfsplus: fix potential overflow in hfsplus_file_truncate() X-Git-Tag: v3.0.75~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7c72cbc040d7160849369d59166f7be32d1991fd;p=thirdparty%2Fkernel%2Fstable.git hfsplus: fix potential overflow in hfsplus_file_truncate() commit 12f267a20aecf8b84a2a9069b9011f1661c779b4 upstream. Change a u32 to loff_t hfsplus_file_truncate(). Signed-off-by: Vyacheslav Dubeyko Cc: Christoph Hellwig Cc: Al Viro Cc: Hin-Tak Leung Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- diff --git a/fs/hfsplus/extents.c b/fs/hfsplus/extents.c index b1991a2a08e09..9d8c087ef4f44 100644 --- a/fs/hfsplus/extents.c +++ b/fs/hfsplus/extents.c @@ -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,