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] qemu: More care over filename string size

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] qemu: More care over filename string sizes.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 11 Jun 2007 02:22:10 -0700
Delivery-date: Mon, 11 Jun 2007 02:23:43 -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 kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1180966872 -3600
# Node ID d0dc12484bf2e1a7397e6ea4bcfeb6ef118494ac
# Parent  fc8e406926908909fe062a45357dcc48c7a365fe
qemu: More care over filename string sizes.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 tools/ioemu/vl.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff -r fc8e40692690 -r d0dc12484bf2 tools/ioemu/vl.c
--- a/tools/ioemu/vl.c  Mon Jun 04 15:17:49 2007 +0100
+++ b/tools/ioemu/vl.c  Mon Jun 04 15:21:12 2007 +0100
@@ -183,7 +183,7 @@ extern int vcpus;
 
 int xc_handle;
 
-char domain_name[1024] = { 'H','V', 'M', 'X', 'E', 'N', '-'};
+char domain_name[64] = "Xen HVM Guest";
 extern int domid;
 
 char vncpasswd[64];
@@ -7058,7 +7058,7 @@ int main(int argc, char **argv)
     extern void *buffered_pio_page;
 #endif
 
-    char qemu_dm_logfilename[64];
+    char qemu_dm_logfilename[128];
 
     LIST_INIT (&vm_change_state_head);
 #ifndef _WIN32
@@ -7525,7 +7525,8 @@ int main(int argc, char **argv)
                 semihosting_enabled = 1;
                 break;
             case QEMU_OPTION_domainname:
-                strncpy(domain_name, optarg, sizeof(domain_name) - 1);
+                strncpy(domain_name, optarg, sizeof(domain_name));
+                domain_name[sizeof(domain_name)-1] = '\0';
                 break;
             case QEMU_OPTION_d:
                 domid = atoi(optarg);

_______________________________________________
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] qemu: More care over filename string sizes., Xen patchbot-unstable <=