W
Werner Wenzel
Running the following MinGW-w64-built code on Windows 7 64 bit crashes
with me:
#include <stdio.h>
#include <uchar.h>
int main(void)
{
mbstate_t mbstate;
puts("So far okay ...");
mbrtoc32(NULL, "", 1, &mbstate);
puts("Not reached due to crash!");
return 0;
}
It should not crash as the problematic line derives from ISO C11 (N1570)
7.28.1.3p2.
As far as I can see this issue is caused by
\mingw-builds\sources\mingw-w64-v3.1.0\mingw-w64-crt\misc\uchar_mbrtoc32.c,
line 32, which--in this special case--dereferences NULL.
Is this thought correct or am I missing something?
Werner
with me:
#include <stdio.h>
#include <uchar.h>
int main(void)
{
mbstate_t mbstate;
puts("So far okay ...");
mbrtoc32(NULL, "", 1, &mbstate);
puts("Not reached due to crash!");
return 0;
}
It should not crash as the problematic line derives from ISO C11 (N1570)
7.28.1.3p2.
As far as I can see this issue is caused by
\mingw-builds\sources\mingw-w64-v3.1.0\mingw-w64-crt\misc\uchar_mbrtoc32.c,
line 32, which--in this special case--dereferences NULL.
Is this thought correct or am I missing something?
Werner