I meet problem. Example:
try
{
char strMes[6];
sprintf_s(strMes, sizeof(strMes), "%s", "012345678");
printf(strMes);
}
catch(...)
{
printf("Wrong\n");
}
In debug environment it caused for debugger "buffer too small" message.
In release environment it caused for crash.
I tried to replace try-catch block to __try-__except(EXCEPTION_EXECUTE_HANDLER) block, but I get the same behavior.
I have about 1K callings for sprintf_s function, so replace sprintf_s to _snprintf_s is not option for me. (see sprintf_s with a buffer too small)
Please help!