https://bugs.winehq.org/show_bug.cgi?id=44405
--- Comment #13 from Nikolay Sivov bunglehead@gmail.com --- (In reply to Richard Yao from comment #12)
I want to submit this patch to wine-devel@, but I seem to need to be subscribed to the mailing list before I can do that. I am waiting for the mailing list administrator to add me to the list. I plan to submit it after I am added to the list, but I submitted this to Proton to hopefully get it merged there sooner:
This doesn't look right. NULL output is used internally to query for needed buffer length, so it should hit this return:
--- 307 if (needed > *out_len) 308 { 309 *out_len = needed; 310 return ERROR_INSUFFICIENT_BUFFER; 311 } ---
The issue is probably in CryptBinaryToStringW export itself, that does not check for NULL output buffer. This needs tests.