All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andre Przywara <andre.przywara@amd.com>
To: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: [PATCHv2 3/4] libxl: add version_info function
Date: Wed, 21 Apr 2010 21:35:03 +0200	[thread overview]
Message-ID: <4BCF5367.6090509@amd.com> (raw)
In-Reply-To: <4BCF1366.1050201@eu.citrix.com>

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

  parent reply	other threads:[~2010-04-21 19:35 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-21 14:17 [PATCHv2 0/4] Add "xl info" command Andre Przywara
2010-04-21 14:17 ` [PATCHv2 1/4] libxl: extend physinfo structure Andre Przywara
2010-04-22  8:03   ` Paolo Bonzini
2010-04-22 11:14     ` Ian Jackson
2010-04-22 11:15       ` Ian Jackson
2010-04-22 15:26       ` Stefano Stabellini
2010-04-21 14:17 ` [PATCHv2 2/4] libxl: add sched_get_id function Andre Przywara
2010-04-21 14:17 ` [PATCHv2 3/4] libxl: add version_info function Andre Przywara
2010-04-21 15:01   ` Vincent Hanquez
2010-04-21 19:34     ` [PATCHv2a " Andre Przywara
2010-04-21 19:35     ` Andre Przywara [this message]
2010-04-21 14:17 ` [PATCHv2 4/4] xl: add "xl info" command Andre Przywara
2010-04-21 14:56 ` [PATCHv2 0/4] Add " Vincent Hanquez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4BCF5367.6090509@amd.com \
    --to=andre.przywara@amd.com \
    --cc=vincent.hanquez@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.