WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: [PATCHv2 3/4] libxl: add version_info function

To: Andre Przywara <andre.przywara@xxxxxxx>
Subject: [Xen-devel] Re: [PATCHv2 3/4] libxl: add version_info function
From: Vincent Hanquez <vincent.hanquez@xxxxxxxxxxxxx>
Date: Wed, 21 Apr 2010 16:01:58 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 21 Apr 2010 08:03:36 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1271859446-25892-4-git-send-email-andre.przywara@xxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1271859446-25892-1-git-send-email-andre.przywara@xxxxxxx> <1271859446-25892-4-git-send-email-andre.przywara@xxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100411 Icedove/3.0.4
On 21/04/10 15:17, Andre Przywara wrote:
+
+    xc_version(ctx->xch, XENVER_commandline,&u.xen_commandline);
+    info->commandline = libxl_sprintf(ctx, u.xen_commandline);

oh actually just missed that; it's important to not include a variable as the format string: if for some reason any of this field end up containing a %something, it will lead usually to segfault.

can you please replace all:

libxl_sprintf(ctx, ..);

by:

libxl_sprintf(ctx, "%s", ...);

Thanks,
--
Vincent

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel