mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-23 19:49:43 +00:00
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
This commit is contained in:
parent
3d878caab9
commit
9b8114a8ef
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user