]> git.sur5r.net Git - u-boot/commitdiff
ubifs.c: BUG: Error following links
authorRicardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Thu, 2 Dec 2010 14:02:35 +0000 (15:02 +0100)
committerStefan Roese <sr@denx.de>
Fri, 3 Dec 2010 17:24:04 +0000 (18:24 +0100)
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>
fs/ubifs/ubifs.c

index d16d2b06a7e8b21060a6686d8d3469a5d0a88eed..5a5c739b53f5caccf1936efa7bbe93178f11494e 100644 (file)
@@ -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 */