On Fri Apr 3 09:17:47 2026 +0000, Hans Leidekker wrote:
Right, and if you run the test multiple times it will occasionally fail. Output size appears to randomly vary up to 8 bytes in size and if the size query returns a smaller size then the next regular call needs it fails. I did some tests on Windows and while the size doesn't vary there's a fixed additional 8 bytes returned for the buffer size query. We can avoid the failures by also adding 8 bytes to the query size. Then there's a quirk where native will return failure but still set last error to ERROR_SUCCESS when a buffer is supplied but the buffer size is too small. I have modified your patch according to my findings and pushed it here: https://gitlab.winehq.org/hans/wine/-/commit/339917e34c249eefa5accefd5c423fa... Feel free to take it if you agree. Good catch, thanks! I was a bit lost :smile:
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/10532#note_134928