https://bugs.winehq.org/show_bug.cgi?id=53010
--- Comment #9 from Gabriel Ivăncescu gabrielopcode@gmail.com --- (In reply to Fabian Maurer from comment #8)
62 is a weird number. Are you sure there's no memory corruption when using 62 characters? Or is it just that it doesn't crash?
Not entirely certain, but it's the point at which it doesn't crash, yes. I did look at the disassembled parts, although I haven't been able to use a debugger (including winedbg) because it instantly quits (it has anti-debugging hacks).
I can see it makes space for a 64-byte buffer, but in this buffer it places the ASCII converted string. It does a dumb conversion by skipping every 2nd byte from the wide string. 62 isn't *entirely* weird, considering a 64-length buffer holds 63 characters at most (since last one is NUL). It is weird in some sense since it's 1 character less than 63, though, so I can see what you mean.
That said, if we limit the buffer to 32 characters (that will 100% fit in the converted buffer it makes space for), that's way too low in my opinion. A lot of legitimate devices have longer names than this, especially in PA where you have "Monitor of ..." sources.