diff options
author | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-07-03 19:54:19 +0000 |
---|---|---|
committer | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-07-03 19:54:19 +0000 |
commit | 64eaabda73382b5b826dcd426200edc7c6c47d8b (patch) | |
tree | d429329a2021cd25fb8fa65c0f7c2d079878a676 /block-vvfat.c | |
parent | 8c5e95d807b355200287ae32cda9b929dd8ed467 (diff) | |
download | qemu-64eaabda73382b5b826dcd426200edc7c6c47d8b.zip qemu-64eaabda73382b5b826dcd426200edc7c6c47d8b.tar.gz qemu-64eaabda73382b5b826dcd426200edc7c6c47d8b.tar.bz2 |
Clarified filename handling, by Johannes Schindelin.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4842 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'block-vvfat.c')
-rw-r--r-- | block-vvfat.c | 7 |
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; |