diff options
author | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-10-28 14:08:49 +0000 |
---|---|---|
committer | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-10-28 14:08:49 +0000 |
commit | 9b8114a8efd373e84e62472c52c1f50a3f60d70d (patch) | |
tree | e751f16ac5fd78df903ca0c4c583f3603ff5a49d /block-vmdk.c | |
parent | 3d878caab914d6ac7b3b69e458971b7550ea790b (diff) |
fix off-by-one generating vmdk backing files (Avi Kivity)
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5567 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'block-vmdk.c')
-rw-r--r-- | block-vmdk.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block-vmdk.c b/block-vmdk.c index b8ecdb739a..eefd76beac 100644 --- a/block-vmdk.c +++ b/block-vmdk.c @@ -344,7 +344,7 @@ static int vmdk_parent_open(BlockDriverState *bs, const char * filename) 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); |