dfd3bb0a99
get_relocated_path() did not have error handling for PathCchSkipRoot() because a path given to get_relocated_path() was expected to be a valid path containing a drive letter or UNC server/share path elements on Windows, but sometimes it turned out otherwise. The paths passed to get_relocated_path() are defined by macros generated by Meson. Meson in turn uses a prefix given by the configure script to generate them. For Windows, the script passes /qemu as a prefix to Meson by default. As documented in docs/about/build-platforms.rst, typically MSYS2 is used for the build system, but it is also possible to use Linux as well. When MSYS2 is used, its Bash variant recognizes /qemu as a MSYS2 path, and converts it to a Windows path, adding the MSYS2 prefix including a drive letter or UNC server/share path elements. Such a conversion does not happen on a shell on Linux however, and /qemu will be passed as is in the case. Implement a proper error handling of PathCchSkipRoot() in get_relocated_path() so that it can handle a path without a drive letter or UNC server/share path elements. Reported-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20231005064726.6945-1-akihiko.odaki@daynix.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> |
||
---|---|---|
.. | ||
aio-posix.c | ||
aio-posix.h | ||
aio-wait.c | ||
aio-win32.c | ||
aiocb.c | ||
async.c | ||
atomic64.c | ||
base64.c | ||
bitmap.c | ||
bitops.c | ||
block-helpers.c | ||
block-helpers.h | ||
buffer.c | ||
bufferiszero.c | ||
cacheflush.c | ||
compatfd.c | ||
coroutine-sigaltstack.c | ||
coroutine-ucontext.c | ||
coroutine-windows.c | ||
cpuinfo-aarch64.c | ||
cpuinfo-i386.c | ||
cpuinfo-ppc.c | ||
crc32c.c | ||
crc-ccitt.c | ||
cutils.c | ||
dbus.c | ||
drm.c | ||
envlist.c | ||
error-report.c | ||
error.c | ||
event_notifier-posix.c | ||
event_notifier-win32.c | ||
fdmon-epoll.c | ||
fdmon-io_uring.c | ||
fdmon-poll.c | ||
fifo8.c | ||
filemonitor-inotify.c | ||
filemonitor-stub.c | ||
getauxval.c | ||
guest-random.c | ||
hbitmap.c | ||
hexdump.c | ||
host-utils.c | ||
id.c | ||
int128.c | ||
interval-tree.c | ||
iov.c | ||
iova-tree.c | ||
keyval.c | ||
lockcnt.c | ||
log.c | ||
main-loop.c | ||
memalign.c | ||
memfd.c | ||
meson.build | ||
mmap-alloc.c | ||
module.c | ||
notify.c | ||
nvdimm-utils.c | ||
osdep.c | ||
oslib-posix.c | ||
oslib-win32.c | ||
path.c | ||
qdist.c | ||
qemu-co-shared-resource.c | ||
qemu-co-timeout.c | ||
qemu-config.c | ||
qemu-coroutine-io.c | ||
qemu-coroutine-lock.c | ||
qemu-coroutine-sleep.c | ||
qemu-coroutine.c | ||
qemu-option.c | ||
qemu-print.c | ||
qemu-progress.c | ||
qemu-sockets.c | ||
qemu-thread-common.h | ||
qemu-thread-posix.c | ||
qemu-thread-win32.c | ||
qemu-timer-common.c | ||
qemu-timer.c | ||
qht.c | ||
qsp.c | ||
qtree.c | ||
range.c | ||
rcu.c | ||
readline.c | ||
selfmap.c | ||
stats64.c | ||
sys_membarrier.c | ||
systemd.c | ||
thread-context.c | ||
thread-pool.c | ||
throttle.c | ||
timed-average.c | ||
trace-events | ||
trace.h | ||
transactions.c | ||
unicode.c | ||
uri.c | ||
userfaultfd.c | ||
uuid.c | ||
vfio-helpers.c | ||
vhost-user-server.c | ||
yank.c |