]> git.feebdaed.xyz Git - 0xmirror/binutils-gdb.git/commit
bfd: correct dir separator conversion for Win32
authorJan Beulich <jbeulich@suse.com>
Fri, 19 Dec 2025 07:51:51 +0000 (08:51 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 19 Dec 2025 07:51:51 +0000 (08:51 +0100)
commit3f89802f207adad4f2f0b8e0f60c44d77727af42
tree79e8be0714a3ce8cb0190122c1c7078512e5cbac
parent1669d187cb4a0b52db1c97e114e7b48b9daed21d
bfd: correct dir separator conversion for Win32

Iterating a wchar_t array holding the conversion of multi-byte (likely
UTF-8) input using array indexes from the corresponding char array isn't
going to work as soon as any characters wider than a single char are
present. Simply walk the wchar_t array all by itself.

While looking at that code I also noticed a wrong argument being passed to
a later MultiByteToWideChar() invocation: This needs to be number of
characters, which isn't sizeof() when the array is of wchar_t elements.
bfd/bfdio.c