From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=46979 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pfr12-0000dK-WD for qemu-devel@nongnu.org; Thu, 20 Jan 2011 04:41:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pfr11-0003Kw-FL for qemu-devel@nongnu.org; Thu, 20 Jan 2011 04:41:16 -0500 Received: from verein.lst.de ([213.95.11.210]:57957) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pfr11-0003Kl-0E for qemu-devel@nongnu.org; Thu, 20 Jan 2011 04:41:15 -0500 Date: Thu, 20 Jan 2011 10:41:11 +0100 From: Christoph Hellwig Message-ID: <20110120094111.GA3328@lst.de> References: <20110119192408.GA1521@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110119192408.GA1521@redhat.com> Subject: [Qemu-devel] Re: [PATCH] pci: fix device paths List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: hch@lst.de, qemu-devel@nongnu.org On Wed, Jan 19, 2011 at 09:24:10PM +0200, Michael S. Tsirkin wrote: > Patch a6a7005d14b3c32d4864a718fb1cb19c789f58a5 generated > broken device paths. We snprintf with a length shorter > than the output, so the last character is discarded and replaced > by the null byte. Fix it up by snprintf to a buffer > which is larger by 1 byte and then memcpy the data (without > the null byte) to where we need it. This fixed the boot for me.