reactos/sdk/lib
Bișoc George 8266f62ff6
[CRT][STDLIB] Wine-sync _mbtowc_l function code
The current _mbtowc_l code directly passes the string count size argument to cbMultiByte argument parameter to MultiByteToWideChar(). As the size of lpMultiByteStr expressed in bytes by cbMultiByte is dependent of the actual given string, the size of lpWideCharStr expressed in characters by cchWideChar is always 1.

The resulting parameters to MultiByteToWideChar() will lead to a failure as lpWideCharStr cannot accommodate the converted string if the size pointed by lpMultiByteStr is larger than the buffer wide string to receive the converted output, a Win32 error code of ERROR_INSUFFICIENT_BUFFER in other words. The fact that _mbtowc_l never fails without WINE Gecko package installed is because the codepage pointed by lc_codepage is CP_ACP and the converted output is directly given to the destination wide string parameter thus never calling MultiByteToWideChar(). Installing WINE Gecko merely unhides this problem.

As _mbtowc_l is imported from WINE and that they have updated their code (which at the same time this fixes the aforementioned problem), the following commit syncs the updated code from WINE.

CORE-16885
2020-04-28 22:41:57 +02:00
..
3rdparty [LIBXML2] Update to version 2.9.10. CORE-16952 2020-04-24 14:44:52 +02:00
atl [ATL] Add some hacks for gcc, 2020-04-04 19:55:31 +02:00
cmlib [CMAKE] Replace custom functions to built-in ones 2020-04-16 15:59:38 +03:00
comsupp
conutils
cportlib [CPORTLIB][NTOS:INBV][KDCOM][FREELDR] Add ComPort library for NEC PC-98 series (#2407) 2020-03-06 19:50:31 +01:00
cpprt [CPPRT] Implement __std_terminate wrapper for Clang-CL 2019-02-12 19:31:33 +01:00
crt [CRT][STDLIB] Wine-sync _mbtowc_l function code 2020-04-28 22:41:57 +02:00
cryptlib
debugsup
delayimp
dmilib
dnslib
drivers [LWIP] Use tcp_close when both shut_rx and shut_tx are set. Fixes CORE-16868 (#2582) 2020-04-26 18:40:47 +02:00
dxguid
epsapi
evtlib
fast486 [REACTOS] Fix misc 64 bit issues (#783) 2019-01-05 10:50:11 +01:00
fslib [BTRFS][UBTRFS][SHELLBTRFS] Upgrade to 1.7.2 2020-04-23 07:07:36 +03:00
gcc_ssp
inflib [CMAKE] Replace custom functions to built-in ones 2020-04-16 15:59:38 +03:00
ioevent
lsalib [CMAKE] Replace custom functions to built-in ones 2020-04-16 15:59:38 +03:00
nt [SDK:NT] Remove Win32-isms. 2019-09-19 02:39:59 +02:00
ppcmmu
pseh
rossym [NTOS] Add a #define __ROS_ROSSYM__ when using rossym 2020-04-09 23:00:57 +02:00
rossym_new
rtl [RTL] Implement LdrpRecordUnloadEvent 2020-04-26 14:35:51 +02:00
runtmchk [RUNTMCHK] Provide fallback memset for arm builds 2019-08-20 22:28:11 +02:00
scrnsave
skiplist
smlib
strmiids
tdilib
tzlib [TZLIB] QueryTimeZoneData(): Don't fail if the optional values "Display", "Std", "Dlt" are missing (or too long to be captured). However fail if the timezone information is missing. 2020-04-22 00:58:32 +02:00
udmihelp
uuid [PSDK][UUID] Import natupnp.idl from Wine Staging 4.18. CORE-16441 2019-10-20 20:01:58 +01:00
wdmguid
CMakeLists.txt [TIMEDATE.CPL][SYSSETUP][TZLIB] Introduce a small static library "tzlib": "TimeZone Utilities Library", and use it in timedate.cpl and syssetup.dll. 2020-04-22 00:58:32 +02:00