aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--block-vvfat.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/block-vvfat.c b/block-vvfat.c
index f5ae4f1..2dd1f24 100644
--- a/block-vvfat.c
+++ b/block-vvfat.c
@@ -1410,7 +1410,12 @@ static void schedule_mkdir(BDRVVVFATState* s, uint32_t cluster, char* path)
}
typedef struct {
- unsigned char name[1024];
+ /*
+ * Since the sequence number is at most 0x3f, and the filename
+ * length is at most 13 times the sequence number, the maximal
+ * filename length is 0x3f * 13 bytes.
+ */
+ unsigned char name[0x3f * 13 + 1];
int checksum, len;
int sequence_number;
} long_file_name;