diff --git a/tests/aws-cpp-sdk-core-tests/utils/logging/LoggingTest.cpp b/tests/aws-cpp-sdk-core-tests/utils/logging/LoggingTest.cpp index 91c859e4890..6df8cb656a8 100644 --- a/tests/aws-cpp-sdk-core-tests/utils/logging/LoggingTest.cpp +++ b/tests/aws-cpp-sdk-core-tests/utils/logging/LoggingTest.cpp @@ -84,6 +84,10 @@ class MockCRTLogSystem : public DefaultCRTLogSystem va_end(tmp_args); Array outputBuff(requiredLength); + if(!outputBuff.GetUnderlyingData() || !outputBuff.GetLength()) { + assert(!"Failed to allocate mock outputBuff!"); + return; + } #ifdef _WIN32 vsnprintf_s(outputBuff.GetUnderlyingData(), outputBuff.GetLength(), _TRUNCATE, formatStr, args); #else