https://bugs.winehq.org/show_bug.cgi?id=44405
--- Comment #15 from Richard Yao ryao@gentoo.org --- (In reply to Nikolay Sivov from comment #13)
The issue is probably in CryptBinaryToStringW export itself, that does not check for NULL output buffer. This needs tests.
This is incorrect. CryptBinaryToStringW is not being called. BinaryToBase64W is. However, BinaryToBase64W is marked static, so the unwinding code mistakenly identifies the function in the call frame as CryptBinaryToStringW. What is happening is that BinaryToBase64W is calling encodeBase64W to do a length calculation with a NULL pointer. It should return, but it instead tries to write out to the NULL pointer, causing the segmentation fault.