diff options
| author | Max Reitz | 2013-10-26 15:44:43 +0200 |
|---|---|---|
| committer | Kevin Wolf | 2013-10-28 17:35:52 +0100 |
| commit | 61ed2684539f7f31304e193d7c0e68d57ce6be88 (patch) | |
| tree | 611df1028c679cdfc23e4d40dd8acf918c05ae6e /include/exec | |
| parent | tests: Multiboot mmap test case (diff) | |
| download | qemu-61ed2684539f7f31304e193d7c0e68d57ce6be88.tar.gz qemu-61ed2684539f7f31304e193d7c0e68d57ce6be88.tar.xz qemu-61ed2684539f7f31304e193d7c0e68d57ce6be88.zip | |
block: Don't copy backing file name on error
bdrv_open_backing_file() tries to copy the backing file name using
pstrcpy directly after calling bdrv_open() to open the backing file
without checking whether that was actually successful. If it was not,
ps->backing_hd->file will probably be NULL and qemu will crash.
Fix this by moving pstrcpy after checking whether bdrv_open() succeeded.
Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Benoit Canet <benoit@irqsave.net>
Reviewed-by: Amos Kong <kongjianjun@gmail.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'include/exec')
0 files changed, 0 insertions, 0 deletions
