From 679dcd55935d96b0af9212fc7c204bf1522332ad Mon Sep 17 00:00:00 2001 From: SergeyRyabinin Date: Mon, 28 Aug 2023 17:32:53 +0000 Subject: [PATCH] Fix LoggingTest build on some platforms with some build config --- tests/aws-cpp-sdk-core-tests/utils/logging/LoggingTest.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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