Commit 89edd36f authored by Linus Torvalds's avatar Linus Torvalds
Browse files

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
parents 7e29f077 678e1cc2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -184,7 +184,7 @@ xrep_symlink_salvage_inline(
	    sc->ip->i_disk_size == 1 && old_target[0] == '?')
		return 0;

	nr = min(XFS_SYMLINK_MAXLEN, xfs_inode_data_fork_size(ip));
	nr = min(XFS_SYMLINK_MAXLEN, ifp->if_bytes);
	memcpy(target_buf, ifp->if_data, nr);
	return nr;
}