From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KupFd-0000tL-1d for qemu-devel@nongnu.org; Tue, 28 Oct 2008 10:08:53 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KupFb-0000sE-E7 for qemu-devel@nongnu.org; Tue, 28 Oct 2008 10:08:52 -0400 Received: from [199.232.76.173] (port=43407 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KupFb-0000s3-8d for qemu-devel@nongnu.org; Tue, 28 Oct 2008 10:08:51 -0400 Received: from savannah.gnu.org ([199.232.41.3]:47561 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KupFa-0004jf-UB for qemu-devel@nongnu.org; Tue, 28 Oct 2008 10:08:51 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1KupFZ-0001QG-Ub for qemu-devel@nongnu.org; Tue, 28 Oct 2008 14:08:50 +0000 Received: from aliguori by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1KupFZ-0001QB-LY for qemu-devel@nongnu.org; Tue, 28 Oct 2008 14:08:49 +0000 MIME-Version: 1.0 Errors-To: aliguori Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Anthony Liguori Message-Id: Date: Tue, 28 Oct 2008 14:08:49 +0000 Subject: [Qemu-devel] [5567] fix off-by-one generating vmdk backing files (Avi Kivity) Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Revision: 5567 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5567 Author: aliguori Date: 2008-10-28 14:08:49 +0000 (Tue, 28 Oct 2008) Log Message: ----------- fix off-by-one generating vmdk backing files (Avi Kivity) Signed-off-by: Avi Kivity Signed-off-by: Anthony Liguori Modified Paths: -------------- trunk/block-vmdk.c Modified: trunk/block-vmdk.c =================================================================== --- trunk/block-vmdk.c 2008-10-28 10:59:59 UTC (rev 5566) +++ trunk/block-vmdk.c 2008-10-28 14:08:49 UTC (rev 5567) @@ -344,7 +344,7 @@ if ((end_name - p_name) > sizeof (s->hd->backing_file) - 1) return -1; - pstrcpy(s->hd->backing_file, end_name - p_name, p_name); + pstrcpy(s->hd->backing_file, end_name - p_name + 1, p_name); if (stat(s->hd->backing_file, &file_buf) != 0) { path_combine(parent_img_name, sizeof(parent_img_name), filename, s->hd->backing_file);