- ext3-ensure-link-targets-are-null-terminated.patch removed from -mm tree
diff mbox

Message ID 200812160009.mBG09lC0000695@imap1.linux-foundation.org
State Not Applicable, archived
Headers show

Commit Message

Andrew Morton Dec. 16, 2008, 12:09 a.m. UTC
The patch titled
     ext3: ensure link targets are NULL-terminated
has been removed from the -mm tree.  Its filename was
     ext3-ensure-link-targets-are-null-terminated.patch

This patch was dropped because an updated version will be merged

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: ext3: ensure link targets are NULL-terminated
From: "Duane Griffin" <duaneg@dghda.com>

Ensure link targets are NUL-terminated, even if corrupted on-disk.

Signed-off-by: Duane Griffin <duaneg@dghda.com>
Cc: <linux-ext4@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 fs/ext3/inode.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Patch
diff mbox

diff -puN fs/ext3/inode.c~ext3-ensure-link-targets-are-null-terminated fs/ext3/inode.c
--- a/fs/ext3/inode.c~ext3-ensure-link-targets-are-null-terminated
+++ a/fs/ext3/inode.c
@@ -2817,9 +2817,10 @@  struct inode *ext3_iget(struct super_blo
 		inode->i_op = &ext3_dir_inode_operations;
 		inode->i_fop = &ext3_dir_operations;
 	} else if (S_ISLNK(inode->i_mode)) {
-		if (ext3_inode_is_fast_symlink(inode))
+		if (ext3_inode_is_fast_symlink(inode)) {
 			inode->i_op = &ext3_fast_symlink_inode_operations;
-		else {
+			((char *) ei->i_data)[inode->i_size] = '\0';
+		} else {
 			inode->i_op = &ext3_symlink_inode_operations;
 			ext3_set_aops(inode);
 		}