Skip to content

Commit

Permalink
fix: CucumberWireProtocolFormatter; max string value size does not fi…
Browse files Browse the repository at this point in the history
…t into stepMatchArgumentsBuffer. (philips-software#311)
  • Loading branch information
EkelmansPh committed May 31, 2023
1 parent d5d4abf commit 5504202
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion services/cucumber/CucumberWireProtocolFormatter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ namespace services
void CucumberWireProtocolFormatter::AddStringValue(infra::JsonArrayFormatter& formatter, const infra::BoundedString& nameToMatch, std::size_t& argPos, int16_t& offset)
{
infra::JsonObjectFormatter subObject(formatter.SubObject());
infra::StringOutputStream::WithStorage<1024> stringStream;
infra::StringOutputStream::WithStorage<992> stringStream;
for (uint16_t i = 1; nameToMatch[argPos + offset + i] != '\''; ++i)
stringStream << nameToMatch[argPos + offset + i];
subObject.Add("val", stringStream.Storage());
Expand Down
2 changes: 1 addition & 1 deletion services/cucumber/CucumberWireProtocolFormatter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ namespace services
private:
CucumberWireProtocolParser& parser;
CucumberWireProtocolController& controller;
infra::BoundedString::WithStorage<512> stepMatchArgumentsBuffer;
infra::BoundedString::WithStorage<1024> stepMatchArgumentsBuffer;
};
}

Expand Down

0 comments on commit 5504202

Please sign in to comment.