From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vyacheslav Dubeyko Subject: [PATCH] hfsplus: fix potential overflow in hfsplus_file_truncate() Date: Tue, 16 Apr 2013 18:54:33 +0400 Message-ID: <1366124073.2091.11.camel@slavad-ubuntu> Reply-To: slava@dubeyko.com Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: Andrew Morton , Christoph Hellwig , Al Viro , Hin-Tak Leung To: linux-fsdevel@vger.kernel.org Return-path: Received: from oproxy1-pub.bluehost.com ([66.147.249.253]:39470 "HELO oproxy1-pub.bluehost.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1751086Ab3DPOyk (ORCPT ); Tue, 16 Apr 2013 10:54:40 -0400 Sender: linux-fsdevel-owner@vger.kernel.org List-ID: From: Vyacheslav Dubeyko Subject: [PATCH] hfsplus: fix potential overflow in hfsplus_file_truncate() This patch changes u32 on loff_t type of variable in hfsplus_file_truncate() method. Signed-off-by: Vyacheslav Dubeyko --- fs/hfsplus/extents.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/hfsplus/extents.c b/fs/hfsplus/extents.c index e38f1fa..43658c6 100644 --- a/fs/hfsplus/extents.c +++ b/fs/hfsplus/extents.c @@ -533,7 +533,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; res = pagecache_write_begin(NULL, mapping, size, 0, AOP_FLAG_UNINTERRUPTIBLE, -- 1.7.9.5