Commit 9b8114a8efd373e84e62472c52c1f50a3f60d70d
1 parent
3d878caa
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
Showing
1 changed file
with
1 additions
and
1 deletions
block-vmdk.c
... | ... | @@ -344,7 +344,7 @@ static int vmdk_parent_open(BlockDriverState *bs, const char * filename) |
344 | 344 | if ((end_name - p_name) > sizeof (s->hd->backing_file) - 1) |
345 | 345 | return -1; |
346 | 346 | |
347 | - pstrcpy(s->hd->backing_file, end_name - p_name, p_name); | |
347 | + pstrcpy(s->hd->backing_file, end_name - p_name + 1, p_name); | |
348 | 348 | if (stat(s->hd->backing_file, &file_buf) != 0) { |
349 | 349 | path_combine(parent_img_name, sizeof(parent_img_name), |
350 | 350 | filename, s->hd->backing_file); | ... | ... |