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] [xen-unstable] libxc: check length on string copy (strcp

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] libxc: check length on string copy (strcpy -> strncpy).
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 31 Oct 2007 15:03:44 -0700
Delivery-date: Wed, 31 Oct 2007 15:03:59 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir@xxxxxxxxxxxxx>
# Date 1193146926 -3600
# Node ID 8f33d2c6c67c1b9d647280c2ba8ce6f907583871
# Parent  b3fa9b58a102c17313da66e4c6150b117f3b3661
libxc: check length on string copy (strcpy -> strncpy).
Signed-off-by: Christoph Egger <Christoph.Egger@xxxxxxx>
---
 tools/libxc/xc_dom_boot.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)

diff -r b3fa9b58a102 -r 8f33d2c6c67c tools/libxc/xc_dom_boot.c
--- a/tools/libxc/xc_dom_boot.c Tue Oct 23 14:38:47 2007 +0100
+++ b/tools/libxc/xc_dom_boot.c Tue Oct 23 14:42:06 2007 +0100
@@ -92,7 +92,9 @@ int xc_dom_compat_check(struct xc_dom_im
     char *item, *ptr;
     int match, found = 0;
 
-    strcpy(xen_caps, dom->xen_caps);
+    strncpy(xen_caps, dom->xen_caps, XEN_CAPABILITIES_INFO_LEN - 1);
+    xen_caps[XEN_CAPABILITIES_INFO_LEN - 1] = '\0';
+
     for ( item = strtok_r(xen_caps, " ", &ptr);
           item != NULL ; item = strtok_r(NULL, " ", &ptr) )
     {

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] libxc: check length on string copy (strcpy -> strncpy)., Xen patchbot-unstable <=