projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3edc837
)
eCryptfs: fix 32 bit corruption issue
author
Colin Ian King
<
[email protected]
>
Thu, 24 Oct 2013 14:08:07 +0000
(14:08 +0000)
committer
Tyler Hicks
<
[email protected]
>
Thu, 24 Oct 2013 19:36:30 +0000
(12:36 -0700)
Shifting page->index on 32 bit systems was overflowing, causing
data corruption of > 4GB files. Fix this by casting it first.
https://launchpad.net/bugs/
1243636
Signed-off-by: Colin Ian King <
[email protected]
>
Reported-by: Lars Duesing <
[email protected]
>
Cc:
[email protected]
# v3.11+
Signed-off-by: Tyler Hicks <
[email protected]
>
fs/ecryptfs/crypto.c
patch
|
blob
|
history
diff --git
a/fs/ecryptfs/crypto.c
b/fs/ecryptfs/crypto.c
index c88e355f7635f61e59f58cb4acc617b84928e4e5..000eae2782b6e905aefa05980ef91c54b81a8274 100644
(file)
--- a/
fs/ecryptfs/crypto.c
+++ b/
fs/ecryptfs/crypto.c
@@
-408,7
+408,7
@@
static loff_t lower_offset_for_page(struct ecryptfs_crypt_stat *crypt_stat,
struct page *page)
{
return ecryptfs_lower_header_size(crypt_stat) +
- (page->index << PAGE_CACHE_SHIFT);
+ (
(loff_t)
page->index << PAGE_CACHE_SHIFT);
}
/**