[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] qemu: More care over filename string sizes.



# 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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.