From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olaf Hering Subject: [PATCH] qemu/block-vvfat.c: fix warnings with _FORTIFY_SOURCE Date: Tue, 2 Nov 2010 23:38:41 +0100 Message-ID: <20101102223841.GA3932@aepfle.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org In function 'snprintf', inlined from 'init_directories' at block-vvfat.c:868:10, inlined from 'vvfat_open' at block-vvfat.c:1065:24: /usr/include/bits/stdio2.h:65:3: warning: call to __builtin___snprintf_chk will always overflow destination buffer Signed-off-by: Kirill A. Shutemov Signed-off-by: Juan Quintela Signed-off-by: Anthony Liguori Signed-off-by: Olaf Hering --- ioemu-remote/block-vvfat.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- xen-unstable.hg-4.1.22285.orig/ioemu-remote/block-vvfat.c +++ xen-unstable.hg-4.1.22285/ioemu-remote/block-vvfat.c @@ -865,7 +865,8 @@ static int init_directories(BDRVVVFATSta { direntry_t* entry=array_get_next(&(s->directory)); entry->attributes=0x28; /* archive | volume label */ - snprintf((char*)entry->name,11,"QEMU VVFAT"); + memcpy(entry->name,"QEMU VVF",8); + memcpy(entry->extension,"AT",3); } /* Now build FAT, and write back information into directory */