WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] qemu/block-vvfat.c: fix warnings with _FORTIFY_SOURC

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] qemu/block-vvfat.c: fix warnings with _FORTIFY_SOURCE
From: Olaf Hering <olaf@xxxxxxxxx>
Date: Tue, 2 Nov 2010 23:38:41 +0100
Delivery-date: Tue, 02 Nov 2010 15:49:48 -0700
Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; t=1288737520; l=1048; s=domk; d=aepfle.de; h=Content-Type:MIME-Version:Subject:To:From:Date:X-RZG-CLASS-ID: X-RZG-AUTH; bh=F4RzZk01IJo5pJ/WgWt7IscE5tE=; b=cjQoc21iiz1t+RynRBSd4+9/LEbcYIsE5v8c37rTco1QSn0uKPhkSM1pWNBr1OwBnDo iTh5EujyaMcZAXfM/xZGfE5xR4NJOE9dWN5HLmjI6giIKzhpiI2tSQUqYQCx8VCV7fNiH zA4EeqpwIiPNY4+3s/1dgMJQmq6WdSxjrJw=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.20 (2009-06-14)
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@xxxxxxxxxxxxx>
Signed-off-by: Juan Quintela <quintela@xxxxxxxxxx>
Signed-off-by: Anthony Liguori <aliguori@xxxxxxxxxx>
Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>

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

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>