Skip to content
Snippets Groups Projects
Commit 64b68178 authored by Ricardo Ribalda Delgado's avatar Ricardo Ribalda Delgado Committed by Stefan Roese
Browse files

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: default avatarRicardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: default avatarStefan Roese <sr@denx.de>
parent 2f15cfd1
No related branches found
No related tags found
No related merge requests found
...@@ -384,6 +384,7 @@ static unsigned long ubifs_findfile(struct super_block *sb, char *filename) ...@@ -384,6 +384,7 @@ static unsigned long ubifs_findfile(struct super_block *sb, char *filename)
unsigned long root_inum = 1; unsigned long root_inum = 1;
unsigned long inum; unsigned long inum;
int symlink_count = 0; /* Don't allow symlink recursion */ int symlink_count = 0; /* Don't allow symlink recursion */
char link_name[64];
strcpy(fpath, filename); strcpy(fpath, filename);
...@@ -420,7 +421,6 @@ static unsigned long ubifs_findfile(struct super_block *sb, char *filename) ...@@ -420,7 +421,6 @@ static unsigned long ubifs_findfile(struct super_block *sb, char *filename)
ui = ubifs_inode(inode); ui = ubifs_inode(inode);
if ((inode->i_mode & S_IFMT) == S_IFLNK) { if ((inode->i_mode & S_IFMT) == S_IFLNK) {
char link_name[64];
char buf[128]; char buf[128];
/* We have some sort of symlink recursion, bail out */ /* We have some sort of symlink recursion, bail out */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment