Skip to content

Commit 89edd36

Browse files
committed
Merge tag 'xfs-fixes-6.18-rc7' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux
Pull xfs fix from Carlos Maiolino: "A single out-of-bounds fix, nothing special" * tag 'xfs-fixes-6.18-rc7' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: fix out of bounds memory read error in symlink repair
2 parents 7e29f07 + 678e1cc commit 89edd36

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/xfs/scrub/symlink_repair.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ xrep_symlink_salvage_inline(
184184
sc->ip->i_disk_size == 1 && old_target[0] == '?')
185185
return 0;
186186

187-
nr = min(XFS_SYMLINK_MAXLEN, xfs_inode_data_fork_size(ip));
187+
nr = min(XFS_SYMLINK_MAXLEN, ifp->if_bytes);
188188
memcpy(target_buf, ifp->if_data, nr);
189189
return nr;
190190
}

0 commit comments

Comments
 (0)