summaryrefslogtreecommitdiffstats
path: root/src/fat_dir.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2016-06-14 19:04:44 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2016-06-14 19:04:44 +0200
commit2d2292caede8d4bebb7968fb8fb181df55f07aaf (patch)
tree3209453ed22d607e4c6f2f3cffb1a789ce6272cc /src/fat_dir.c
parentd576a81e1f0481cef490974509273e54dd572372 (diff)
Fix for various cppcheck warnings
Diffstat (limited to 'src/fat_dir.c')
-rw-r--r--src/fat_dir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fat_dir.c b/src/fat_dir.c
index 4423a0a..fbe1095 100644
--- a/src/fat_dir.c
+++ b/src/fat_dir.c
@@ -261,7 +261,7 @@ RecEnd:
unsigned int i,o;
file_info_t *new_file=(file_info_t *)MALLOC(sizeof(*new_file));
new_file->name=(char*)MALLOC(DIR_NAME_LEN);
- for(i=0,o=0; unicode[i]!=0 && o<DIR_NAME_LEN-1; i++)
+ for(i=0,o=0; o<DIR_NAME_LEN-2 && unicode[i]!=0; i++)
{
if(utf8 && unicode[i]>0x7f)
{