All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] qemu/block-vvfat.c: fix warnings with _FORTIFY_SOURCE
@ 2010-11-02 22:38 Olaf Hering
  2010-11-03 12:50 ` Ian Jackson
  0 siblings, 1 reply; 4+ messages in thread
From: Olaf Hering @ 2010-11-02 22:38 UTC (permalink / raw)
  To: xen-devel

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 <kirill@shutemov.name>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Olaf Hering <olaf@aepfle.de>

---
 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 */

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-11-03 16:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-02 22:38 [PATCH] qemu/block-vvfat.c: fix warnings with _FORTIFY_SOURCE Olaf Hering
2010-11-03 12:50 ` Ian Jackson
2010-11-03 14:04   ` Olaf Hering
2010-11-03 16:54     ` Ian Jackson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.