ia64/xen-unstable

changeset 15268:d0dc12484bf2

qemu: More care over filename string sizes.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Mon Jun 04 15:21:12 2007 +0100 (2007-06-04)
parents fc8e40692690
children 5710c94e6539
files tools/ioemu/vl.c
line diff
     1.1 --- a/tools/ioemu/vl.c	Mon Jun 04 15:17:49 2007 +0100
     1.2 +++ b/tools/ioemu/vl.c	Mon Jun 04 15:21:12 2007 +0100
     1.3 @@ -183,7 +183,7 @@ extern int vcpus;
     1.4  
     1.5  int xc_handle;
     1.6  
     1.7 -char domain_name[1024] = { 'H','V', 'M', 'X', 'E', 'N', '-'};
     1.8 +char domain_name[64] = "Xen HVM Guest";
     1.9  extern int domid;
    1.10  
    1.11  char vncpasswd[64];
    1.12 @@ -7058,7 +7058,7 @@ int main(int argc, char **argv)
    1.13      extern void *buffered_pio_page;
    1.14  #endif
    1.15  
    1.16 -    char qemu_dm_logfilename[64];
    1.17 +    char qemu_dm_logfilename[128];
    1.18  
    1.19      LIST_INIT (&vm_change_state_head);
    1.20  #ifndef _WIN32
    1.21 @@ -7525,7 +7525,8 @@ int main(int argc, char **argv)
    1.22                  semihosting_enabled = 1;
    1.23                  break;
    1.24              case QEMU_OPTION_domainname:
    1.25 -                strncpy(domain_name, optarg, sizeof(domain_name) - 1);
    1.26 +                strncpy(domain_name, optarg, sizeof(domain_name));
    1.27 +                domain_name[sizeof(domain_name)-1] = '\0';
    1.28                  break;
    1.29              case QEMU_OPTION_d:
    1.30                  domid = atoi(optarg);