Skip to contentSkip to conversation

hfsplus: fix potential overflow in hfsplus_file_truncate()

PATCH New Vyacheslav Dubeyko 1 participant 1 message Apr 16, 2013

Subsystems (2)
lore
Share & tools
lore

Vyacheslav Dubeyko

author maintainer
#0 lore raw

PATCH 1/1 hfsplus: fix potential overflow in hfsplus_file_truncate()

From: Vyacheslav Dubeyko <[email protected]>
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.

---
 fs/hfsplus/extents.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/hfsplus/extents.c +1 -1
index e38f1fa..43658c6 100644
@@ -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,
Signature · 1 line
1.7.9.5