From: Ian Jackson Subject: Re: [PATCH 1/2] Add a new pvdrivers header to serve as the register of product numbers. [and 1 more messages] Date: Mon, 1 Oct 2012 17:27:37 +0100 Message-ID: <20585.50297.106231.155363@mariner.uk.xensource.com> References: <1349084633-13186-1-git-send-email-paul.durrant@citrix.com> <20585.45901.698074.351144@mariner.uk.xensource.com> <291EDFCB1E9E224A99088639C4762022FDDCAB6EB5@LONPMAILBOX01.citrite.net> <1349084491-13027-1-git-send-email-paul.durrant@citrix.com> <1349084491-13027-2-git-send-email-paul.durrant@citrix.com> <20585.45787.302130.684768@mariner.uk.xensource.com> <291EDFCB1E9E224A99088639C4762022FDDCAB6EB9@LONPMAILBOX01.citrite.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <291EDFCB1E9E224A99088639C4762022FDDCAB6EB9@LONPMAILBOX01.citrite.net>, <291EDFCB1E9E224A99088639C4762022FDDCAB6EB5@LONPMAILBOX01.citrite.net> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Paul Durrant Cc: "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org Paul Durrant writes ("RE: [Xen-devel] [PATCH 1/2] Add a new pvdrivers header to serve as the register of product numbers."): > Ok. I thought it was helpful to reserve product number 0 for this purpose, but I'll ditch it. Well if you want to reserve it you could put a comment in the list saying "0 is reserved, do not use". Paul Durrant writes ("Re: [Xen-devel] [PATCH] Use new Xen public header for product numbers and names"): > Ian Jackson [mailto:Ian.Jackson@eu.citrix.com]: > > As a case in point, this generates: > > case 0: product = NULL; break; > > and then passes the NULL to asprintf. > > Nothing should be using product number 0, so is this a problem? You're joking, right ? The guest can send any value it likes here and the result is that qemu might dereference NULL. (Although in practice asprintf doesn't crash on NULL strings in any implementation I'm aware of.) Ian.