Skip to contentSkip to conversation

ubifs.c: BUG: Error following links

PATCH New Ricardo Ribalda Delgado 2 participants 2 messages Dec 2, 2010 – Dec 3, 2010 UBI file system (UBIFS)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ubifs.c: BUG: Error following links

The link_name variable is declared inside the if block and it is used outside it through the name pointer.

---
 fs/ubifs/ubifs.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
fs/ubifs/ubifs.c +1 -1
index 0f8128c..2bad027 100644
@@ -386,6 +386,7 @@ static unsigned long ubifs_findfile(struct super_block *sb, char *filename)
 	unsigned long root_inum = 1;
 	unsigned long inum;
 	int symlink_count = 0; /* Don't allow symlink recursion */
+	char link_name[64];
 
 	strcpy(fpath, filename);
 
@@ -422,7 +423,6 @@ static unsigned long ubifs_findfile(struct super_block *sb, char *filename)
 		ui = ubifs_inode(inode);
 
 		if ((inode->i_mode & S_IFMT) == S_IFLNK) {
-			char link_name[64];
 			char buf[128];
 
 			/* We have some sort of symlink recursion, bail out */
Signature · 1 line
1.7.2.3
#1 lore raw

PATCH 1/1 ubifs.c: BUG: Error following links

Quoted 2 lines · On Thursday 02 December 2010 15:02:35 Ricardo Ribalda Delgado wrote:

The link_name variable is declared inside the if block and it is used outside it through the name pointer.

Applied to u-boot-ubi/master. Thanks.

Cheers,
Stefan

--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de