xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Ian Jackson <Ian.Jackson@eu.citrix.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>,
	George Dunlap <george.dunlap@citrix.com>,
Subject: Re: [PATCH 1/1] libxl: Fix uninitialized pointer when passing an empty cdrom
Date: Wed, 6 Apr 2016 14:47:24 +0100	[thread overview]
Message-ID: <22277.4972.198847.738071@mariner.uk.xensource.com> (raw)
In-Reply-To: <5704FCBD.1010300@citrix.com>

Andrew Cooper writes ("Re: [PATCH 1/1] libxl: Fix uninitialized pointer when passing an empty cdrom"):
> On 06/04/16 12:34, George Dunlap wrote:
> > Commit 3fec17d4bb56567d139d7806392f4d8702d3f6a7 introduced a bug where
> > an empty cdrom would cause target_path to be uninitialized.  Initialize
> > target_path to NULL instead.
> >
> > The other option here would have been to set target_path to NULL only
> > on the LIBXL_DISK_FORMAT_EMPTY path.  That would potentially enable
> > the compiler to catch future uninitialized paths, rather than having
> > those paths (potentially) dereference a NULL pointer.  But given that
> > a bunch of our compilers failed to catch *this* uninitialized path,
> > setting it to NULL at declaration seems the safer option for now.

This reasoning is plausible.

> > Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
> > Signed-off-by: George Dunlap <george.dunlap@citrix.com>
> This looks like it will work.  Reviewed-by: Andrew Cooper
> <andrew.cooper3@citrix.com>

Thanks.  Queued.


Xen-devel mailing list

      reply	other threads:[~2016-04-06 13:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-06 11:34 George Dunlap
2016-04-06 12:10 ` Andrew Cooper
2016-04-06 13:47   ` Ian Jackson [this message]

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:

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

  git send-email \
    --in-reply-to=22277.4972.198847.738071@mariner.uk.xensource.com \
    --to=ian.jackson@eu.citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=george.dunlap@citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.org \
    --subject='Re: [PATCH 1/1] libxl: Fix uninitialized pointer when passing an empty cdrom' \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).