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

Orion Poplawski orion at cora.nwra.com
Fri Jan 23 11:38:01 CST 2015


This was reported in https://bugs.winehq.org/show_bug.cgi?id=37953

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
MSVCRT__wctomb().

---
 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: <http://www.winehq.org/pipermail/wine-patches/attachments/20150123/37116df8/attachment.bin>


More information about the wine-patches mailing list