Skip to content

Commit

Permalink
[3298] Fix a warning about strncpy that caused compilation failures v…
Browse files Browse the repository at this point in the history
…ia -Werror
  • Loading branch information
claudiol committed Aug 29, 2018
1 parent 0a148f6 commit 64e9371
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion block-vvfat.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++)
Expand Down

0 comments on commit 64e9371

Please sign in to comment.