Skip to content

Commit

Permalink
hfsplus: fix potential overflow in hfsplus_file_truncate()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Vyacheslav Dubeyko authored and Linus Torvalds committed Apr 17, 2013
1 parent 472d326 commit 12f267a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/hfsplus/extents.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 12f267a

Please sign in to comment.