From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Egger Subject: Re: [PATCH]tools/libxl: fix a bug in libxl__build_device_model_args_new. info->vncpasswd can't be empty if info->vncpasswd != NULL Date: Fri, 15 Apr 2011 10:28:52 +0200 Message-ID: <4DA801C4.5060102@amd.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On 04/15/11 10:33, ZhouPeng wrote: > Signed-off-by: Zhou Peng > > tools/libxl: fix a bug in libxl__build_device_model_args_new. info->vncpasswd can't be empty if info->vncpasswd != NULL > NACK! This can info->vncpasswd[0] contains '\0' if you have vncpasswd='' in the guest config file. Christoph > diff -r 3f00c5faa12a tools/libxl/libxl_dm.c > --- a/tools/libxl/libxl_dm.c Wed Apr 13 16:10:26 2011 +0100 > +++ b/tools/libxl/libxl_dm.c Fri Apr 15 09:45:43 2011 +0800 > @@ -209,7 +209,7 @@ static char ** libxl__build_device_model > int display = 0; > const char *listen = "127.0.0.1"; > > - if (info->vncpasswd&& info->vncpasswd[0]) { > + if (info->vncpasswd&& !info->vncpasswd[0]) { > assert(!"missing code for supplying vnc password to qemu"); > } > flexarray_append(dm_args, "-vnc"); > > -- > Zhou Peng > Operating System Technology Group > Institute of Software, the Chinese Academy of Sciences (ISCAS) > > -- ---to satisfy European Law for business letters: Advanced Micro Devices GmbH Einsteinring 24, 85689 Dornach b. Muenchen Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632