summaryrefslogtreecommitdiffstats
path: root/src/fat_dir.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2009-03-25 08:46:06 +0100
committerChristophe Grenier <grenier@cgsecurity.org>2009-03-25 08:46:06 +0100
commite7bb2e1bfa255f342f7f8324c033bb2cfe4bf60d (patch)
treec39aeaebc05adf9bca269cdcb42e9066864882d7 /src/fat_dir.c
parent2ea8b8e3782b59762594fb7e58f3a579cf93334b (diff)
Stop FAT directory listing when a entry begins by a null char
Diffstat (limited to 'src/fat_dir.c')
-rw-r--r--src/fat_dir.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/fat_dir.c b/src/fat_dir.c
index b0bf243..55c7570 100644
--- a/src/fat_dir.c
+++ b/src/fat_dir.c
@@ -290,7 +290,8 @@ RecEnd:
}
}
de++;
- if((const void *)de<(const void *)(buffer+size-1))
+ if((const void *)de<(const void *)(buffer+size-1) &&
+ de->name[0] != (int8_t) 0)
goto GetNew;
EODir:
return dir_list;