[Mingw-w64-public] Patch: Fix stack overflow in __mingw_wcstof and __mingw_wcstold

2020-02-20 Thread Tim Kosse via Mingw-w64-public
Hi, the attached patch fixes a stack overflow in __mingw_wcstof and __mingw_wcstold. I've also attached a small reproducer for the bug. Interestingly the bugged functions are only called if using C++ and if windows.h is included before wchar.h Regards, Tim Kosse

Re: [Mingw-w64-public] Patch: wcsrtombs with null dst must ignore len

2016-01-08 Thread Tim Kosse
Hi, sorry, must have mixed something up, here's the correct patch. Regards, Tim On 2016-01-04 08:16, Tim Kosse wrote: > Hi, > > the reverse function mbsrtowcs (mingw-w64-crt/misc/mbrtowc.c) suffers > from the same problem. This second patch fixes this function as well. &g

[Mingw-w64-public] Patch: wcsrtombs with null dst must ignore len

2016-01-04 Thread Tim Kosse
Hi, there's a bug in wcsrtombs (mingw-w64-crt/misc/wcrtomb.c) if null is passed as destination buffer. In this case, wcsrtombs does not ignore the len argument. Yet, according to the C99 standard, if the dst is null, the len argument is ignored. The attached patch fixes this bug. Regards

Re: [Mingw-w64-public] Patch: wcsrtombs with null dst must ignore len

2016-01-04 Thread Tim Kosse
Hi, the reverse function mbsrtowcs (mingw-w64-crt/misc/mbrtowc.c) suffers from the same problem. This second patch fixes this function as well. Regards, Tim Kosse On 2016-01-04 01:19, Tim Kosse wrote: > Hi, > > there's a bug in wcsrtombs (mingw-w64-crt/misc/wcrtomb.c) if null