diff --git a/block-vvfat.c b/block-vvfat.c index edc10a4..30a1221 100644 --- a/block-vvfat.c +++ b/block-vvfat.c @@ -636,7 +636,7 @@ static inline direntry_t* create_short_and_long_name(BDRVVVFATState* s, entry=array_get_next(&(s->directory)); memset(entry->name,' ',11); - strncpy((char *) entry->name,filename,i); + memcpy(entry->name,filename,i); if(j > 0) for (i = 0; i < 3 && filename[j+1+i]; i++)