27 Feb
2026
27 Feb
'26
5:02 p.m.
On Fri Feb 27 16:58:50 2026 +0000, Paul Gofman wrote:
Like this: ``` int written = 0, bufsize = 1; if (size == 0) return 0; if ((file->_flag & (MSVCRT__NOBUF | _IOMYBUF | MSVCRT__USERBUF)) || msvcrt_alloc_buffer(file)) bufsize = file->_bufsiz; ``` Yes, in theory it can affect applications that set file-\>\_bufsiz themself (but only for stdout or stderr case, otherwise msvcrt_alloc_buffer would have overwritten it). Taking that into account I think the risk is small. Anyway, above code looks good for me.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/10199#note_130746