From: Ricardo Ribalda Delgado Date: Thu, 2 Dec 2010 14:02:35 +0000 (+0100) Subject: ubifs.c: BUG: Error following links X-Git-Tag: v2010.12-rc3~30^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=64b68178489b6845bcf460e9c6e618cb81740faf;p=platform%2Fkernel%2Fu-boot.git 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 Signed-off-by: Stefan Roese --- diff --git a/fs/ubifs/ubifs.c b/fs/ubifs/ubifs.c index d16d2b0..5a5c739 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 */