msvcrt: Bump MSVCRT_MB_LEN_MAX to 5 and use it in MSVCRT__wctomb_l for default buffer lengthSet MB_LEN_MAX to 5 to match MSVCRT_MB_LEN_MAX
Orion Poplawski
orion at cora.nwra.com
Mon Feb 2 17:14:59 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() to 5.
Also update MB_MAX_LEN to 5 in limits.h as per comment by Piotr Caban.
---
dlls/msvcrt/msvcrt.h | 2 +-
dlls/msvcrt/wcs.c | 2 +-
include/msvcrt/limits.h | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Bump-MSVCRT_MB_LEN_MAX-to-5-and-use-it-in-MSVCRT__wc.patch
Type: text/x-patch
Size: 1200 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20150202/7f489580/attachment.bin>
More information about the wine-patches
mailing list