From: Gianni Tedesco Date: Thu, 23 Sep 2010 18:16:00 +0000 (+0100) Subject: xl: Fix stack corruption caused by non-terminated call to libxl__xs_writev X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~11430 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=0809fbef31f2ab27189ead8eb8124d05ad95189b;p=xen.git xl: Fix stack corruption caused by non-terminated call to libxl__xs_writev Signed-off-by: Gianni Tedesco Tested-by: Christoph Egger Acked-by: Ian Jackson Signed-off-by: Ian Jackson --- diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index 8b086b9123..4e1fd04284 100644 --- a/tools/libxl/libxl.c +++ b/tools/libxl/libxl.c @@ -1718,7 +1718,7 @@ retry_transaction: vm_path = libxl__xs_read(&gc,t,libxl__sprintf(&gc, "%s/vm", p->dom_path)); if (vm_path) { /* Now write the vncpassword into it. */ - pass_stuff = libxl__calloc(&gc, 2, sizeof(char *)); + pass_stuff = libxl__calloc(&gc, 3, sizeof(char *)); pass_stuff[0] = "vncpasswd"; pass_stuff[1] = info->vncpasswd; libxl__xs_writev(&gc,t,vm_path,pass_stuff);