Commit c3514817 authored by Mikulas Patocka's avatar Mikulas Patocka Committed by Linus Torvalds

HPFS: Move declaration up, so that there are no out-of-scope pointers

Move declaration up, so that there are no out-of-scope pointers
Reported-by: default avatarJesper Juhl <jj@chaosbits.net>
Signed-off-by: default avatarMikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent d0969d19
...@@ -76,6 +76,7 @@ int hpfs_read_ea(struct super_block *s, struct fnode *fnode, char *key, ...@@ -76,6 +76,7 @@ int hpfs_read_ea(struct super_block *s, struct fnode *fnode, char *key,
unsigned pos; unsigned pos;
int ano, len; int ano, len;
secno a; secno a;
char ex[4 + 255 + 1 + 8];
struct extended_attribute *ea; struct extended_attribute *ea;
struct extended_attribute *ea_end = fnode_end_ea(fnode); struct extended_attribute *ea_end = fnode_end_ea(fnode);
for (ea = fnode_ea(fnode); ea < ea_end; ea = next_ea(ea)) for (ea = fnode_ea(fnode); ea < ea_end; ea = next_ea(ea))
...@@ -93,7 +94,6 @@ int hpfs_read_ea(struct super_block *s, struct fnode *fnode, char *key, ...@@ -93,7 +94,6 @@ int hpfs_read_ea(struct super_block *s, struct fnode *fnode, char *key,
ano = fnode->ea_anode; ano = fnode->ea_anode;
pos = 0; pos = 0;
while (pos < len) { while (pos < len) {
char ex[4 + 255 + 1 + 8];
ea = (struct extended_attribute *)ex; ea = (struct extended_attribute *)ex;
if (pos + 4 > len) { if (pos + 4 > len) {
hpfs_error(s, "EAs don't end correctly, %s %08x, len %08x", hpfs_error(s, "EAs don't end correctly, %s %08x, len %08x",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment