We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d949d1d commit bc0a2f3Copy full SHA for bc0a2f3
fs/ocfs2/file.c
@@ -1787,6 +1787,14 @@ int ocfs2_remove_inode_range(struct inode *inode,
1787
return 0;
1788
1789
if (OCFS2_I(inode)->ip_dyn_features & OCFS2_INLINE_DATA_FL) {
1790
+ int id_count = ocfs2_max_inline_data_with_xattr(inode->i_sb, di);
1791
+
1792
+ if (byte_start > id_count || byte_start + byte_len > id_count) {
1793
+ ret = -EINVAL;
1794
+ mlog_errno(ret);
1795
+ goto out;
1796
+ }
1797
1798
ret = ocfs2_truncate_inline(inode, di_bh, byte_start,
1799
byte_start + byte_len, 0);
1800
if (ret) {
0 commit comments