Skip to content

Commit

Permalink
Set value to zero in case of decoding error
Browse files Browse the repository at this point in the history
Relates #169
  • Loading branch information
GeorgyKirichenko committed Apr 13, 2024
1 parent 757a404 commit 617dc45
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions common/stream.h
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ inline void stream_in_t::pop(TType& value)
{
if (inBuffer.size() - inPosition < sizeof(TType))
{
memset(&value, 0, sizeof(TType));
inPosition = this->inBuffer.size();
failed = true;
return;
Expand Down

0 comments on commit 617dc45

Please sign in to comment.