debuggers.hg

changeset 22258:105c938eacbb

xl: Fix stack corruption caused by non-terminated call to libxl__xs_writev

Signed-off-by: Gianni Tedesco <gianni.tedesco@citrix.com>
Tested-by: Christoph Egger <Christoph.Egger@amd.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
author Gianni Tedesco <gianni.tedesco@citrix.com>
date Thu Sep 23 19:16:00 2010 +0100 (2010-09-23)
parents 07c1d958eee0
children eb247ea9db8c
files tools/libxl/libxl.c
line diff
     1.1 --- a/tools/libxl/libxl.c	Thu Sep 23 19:03:52 2010 +0100
     1.2 +++ b/tools/libxl/libxl.c	Thu Sep 23 19:16:00 2010 +0100
     1.3 @@ -1718,7 +1718,7 @@ retry_transaction:
     1.4          vm_path = libxl__xs_read(&gc,t,libxl__sprintf(&gc, "%s/vm", p->dom_path));
     1.5          if (vm_path) {
     1.6              /* Now write the vncpassword into it. */
     1.7 -            pass_stuff = libxl__calloc(&gc, 2, sizeof(char *));
     1.8 +            pass_stuff = libxl__calloc(&gc, 3, sizeof(char *));
     1.9              pass_stuff[0] = "vncpasswd";
    1.10              pass_stuff[1] = info->vncpasswd;
    1.11              libxl__xs_writev(&gc,t,vm_path,pass_stuff);