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-changelog

[Xen-changelog] [qemu-xen-unstable] block-vvfat.c: fix warnings with _FO

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [qemu-xen-unstable] block-vvfat.c: fix warnings with _FORTIFY_SOURCE
From: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Date: Wed, 3 Nov 2010 05:50:16 -0700
Delivery-date: Wed, 03 Nov 2010 05:50:23 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
commit e995698610ef5f2d812db6b81d0a71b077bc9695
Author: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Date:   Wed Nov 3 12:46:45 2010 +0000

    block-vvfat.c: fix warnings with _FORTIFY_SOURCE
    
    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>
---
 block-vvfat.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/block-vvfat.c b/block-vvfat.c
index c73add7..9eb676b 100644
--- a/block-vvfat.c
+++ b/block-vvfat.c
@@ -865,7 +865,8 @@ static int init_directories(BDRVVVFATState* s,
     {
        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 */
--
generated by git-patchbot for /home/xen/git/qemu-xen-unstable.git

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [qemu-xen-unstable] block-vvfat.c: fix warnings with _FORTIFY_SOURCE, Ian Jackson <=