diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index ad131a2fc58e..05d6a8acfcda 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c @@ -1784,6 +1784,11 @@ int ocfs2_remove_inode_range(struct inode *inode, return 0; if (OCFS2_I(inode)->ip_dyn_features & OCFS2_INLINE_DATA_FL) { + if (byte_start > UINT_MAX || byte_start + byte_len > UINT_MAX) { + ret = -EFBIG; + mlog_errno(ret); + goto out; + } ret = ocfs2_truncate_inline(inode, di_bh, byte_start, byte_start + byte_len, 0); if (ret) {