From 64e9371769272ead1dbeba69881e56cf4e1fe731 Mon Sep 17 00:00:00 2001 From: claudiol Date: Wed, 29 Aug 2018 18:00:11 -0400 Subject: [PATCH] [3298] Fix a warning about strncpy that caused compilation failures via -Werror --- block-vvfat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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++)