swprintf_s causing Random Crashes and Stack Corruption

This is what happens if you don’t read documentation properly swprintf_s [https://msdn.microsoft.com/en-us/library/ce3zzk1k.aspx ] int swprintf_s( wchar_t *buffer, size_t sizeOfBuffer, const wchar_t *format, … ); sizeOfBuffer Maximum number of characters to store. Documentation says the argument is the number of characters to store and not the size of buffer. More often, such APIs asks for the […]