[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 1/1] libxl: Fix uninitialized pointer when passing an empty cdrom



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@xxxxxxxxxx>
> > Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxxx>
> 
> This looks like it will work.  Reviewed-by: Andrew Cooper
> <andrew.cooper3@xxxxxxxxxx>

Thanks.  Queued.

Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.