msvcrt: Bump MSVCRT_MB_LEN_MAX to 6 and use it in MSVCRT__wctomb_l for default buffer length

Orion Poplawski orion at
Fri Jan 23 11:38:01 CST 2015

This was reported in

On Fedora, which is compiled with -fstack-protector-strong, I was seeing:

trace:msvcrt:pf_printf_w Format is: L"\3577\6000\357e\6000\12d0\7704\eac4i\b53ci"
trace:msvcrt:_lock (29)
*** stack smashing detected ***: /export/home/orion/.wine/drive_c/Program
Files/Adobe/Reader 10.0/Reader/AcroRd32.exe terminated

The attached patch fixes this by synchronizing the expected buffer length for

 dlls/msvcrt/msvcrt.h | 2 +-
 dlls/msvcrt/wcs.c    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Bump-MSVCRT_MB_LEN_MAX-to-6-and-use-it-in-MSVCRT__wc.patch
Type: text/x-patch
Size: 888 bytes
Desc: not available
URL: <>

More information about the wine-patches mailing list