summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--block/vvfat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/vvfat.c b/block/vvfat.c
index ba207e21fc..7e9e35a3a3 100644
--- a/block/vvfat.c
+++ b/block/vvfat.c
@@ -1690,7 +1690,7 @@ static int check_directory_consistency(BDRVVVFATState *s,
 
     long_file_name lfn;
     int path_len = strlen(path);
-    char path2[PATH_MAX];
+    char path2[PATH_MAX + 1];
 
     assert(path_len < PATH_MAX); /* len was tested before! */
     pstrcpy(path2, sizeof(path2), path);