|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] Re: [PATCHv2 3/4] libxl: add version_info function
Vincent Hanquez wrote:
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.
Of course! I could tell you that I just wanted to know if someone will
find this, but actually I was so keen on just replacing strdup with
libxl_sprintf that I totally overlooked the changed semantic of the call.
>
> can you please replace all:
>
> libxl_sprintf(ctx, ..);
>
> by:
>
> libxl_sprintf(ctx, "%s", ...);
>
Sure! Corrected patch follows!
Thanks for looking carefully!
Andre.
--
Andre Przywara
AMD-Operating System Research Center (OSRC), Dresden, Germany
Tel: +49 351 488-3567-12
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|