summaryrefslogtreecommitdiffstats
path: root/src/fat.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2012-09-10 22:16:40 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2012-09-10 22:16:40 +0200
commit6cbb862854011bf8fec7f17a303563faa9b953eb (patch)
tree0db867cd267aeb48aef035f0577efe4f41362159 /src/fat.c
parent86b2772988185c19382ec0d755389a3c897166bf (diff)
Check i before using it as index
Diffstat (limited to 'src/fat.c')
-rw-r--r--src/fat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fat.c b/src/fat.c
index 8181f0f..4f1091e 100644
--- a/src/fat.c
+++ b/src/fat.c
@@ -1057,7 +1057,7 @@ int fat32_free_info(disk_t *disk_car,const partition_t *partition, const unsigne
int check_VFAT_volume_name(const char *name, const unsigned int max_size)
{
unsigned int i;
- for(i=0;name[i]!='\0' && i<max_size;i++)
+ for(i=0; i<max_size && name[i]!='\0'; i++)
{
if(name[i] < 0x20)
return 1;