Skip to content

Commit

Permalink
Fixed dereferencing a nullptr (aws#1750)
Browse files Browse the repository at this point in the history
  • Loading branch information
theShmoo authored Aug 26, 2021
1 parent 083bf95 commit b4b7c67
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions aws-cpp-sdk-core/source/utils/event/EventStreamDecoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,7 @@ namespace Aws
assert(handler);
if (!handler)
{
AWS_LOGSTREAM_ERROR(EVENT_STREAM_DECODER_CLASS_TAG, "Payload received, but decoder encountered internal errors before."
"ErrorCode: " << EventStreamErrorsMapper::GetNameForError(handler->GetInternalError()) << ", "
"ErrorMessage: " << handler->GetEventPayloadAsString());
AWS_LOGSTREAM_ERROR(EVENT_STREAM_DECODER_CLASS_TAG, "Payload received, but decoder encountered internal errors before.");
return;
}
handler->WriteMessageEventPayload(static_cast<unsigned char*>(payload->buffer), payload->len);
Expand Down Expand Up @@ -129,9 +127,7 @@ namespace Aws
assert(handler);
if (!handler)
{
AWS_LOGSTREAM_ERROR(EVENT_STREAM_DECODER_CLASS_TAG, "Payload received, but decoder encountered internal errors before."
"ErrorCode: " << EventStreamErrorsMapper::GetNameForError(handler->GetInternalError()) << ", "
"ErrorMessage: " << handler->GetEventPayloadAsString());
AWS_LOGSTREAM_ERROR(EVENT_STREAM_DECODER_CLASS_TAG, "Payload received, but decoder encountered internal errors before.");
return;
}

Expand Down

0 comments on commit b4b7c67

Please sign in to comment.