summaryrefslogtreecommitdiff
path: root/fs/ubifs/ubifs.c
diff options
context:
space:
mode:
authorRicardo Ribalda Delgado <ricardo.ribalda@gmail.com>2010-12-02 15:02:35 +0100
committerStefan Roese <sr@denx.de>2010-12-03 18:24:04 +0100
commit64b68178489b6845bcf460e9c6e618cb81740faf (patch)
tree729b9a41196c6d1978d8007a532e37739e78239a /fs/ubifs/ubifs.c
parent2f15cfd187f1cf7a0606a1ec3e637954311a735a (diff)
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. Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'fs/ubifs/ubifs.c')
-rw-r--r--fs/ubifs/ubifs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ubifs/ubifs.c b/fs/ubifs/ubifs.c
index d16d2b06a7..5a5c739b53 100644
--- a/fs/ubifs/ubifs.c
+++ b/fs/ubifs/ubifs.c
@@ -384,6 +384,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);
@@ -420,7 +421,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 */