Skip to content

Commit

Permalink
[SUREFIRE-2056] Fix buffer overflow in EventChannelEncoder when the t…
Browse files Browse the repository at this point in the history
…est ID is null
  • Loading branch information
yrodiere committed Apr 5, 2022
1 parent bdbc828 commit 61ebc8e
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -393,7 +393,7 @@ ByteBuffer encodeMessage( ForkedProcessEventType eventType, RunMode runMode, Lon
{
CharsetEncoder encoder = newCharsetEncoder();
int bufferMaxLength = estimateBufferLength( eventType.getOpcode().length(), runMode, encoder, 0,
testRunId == null ? 0 : 1, message );
1, message );
ByteBuffer result = ByteBuffer.allocate( bufferMaxLength );
encode( encoder, result, eventType, runMode, testRunId, message );
return result;
Expand Down

0 comments on commit 61ebc8e

Please sign in to comment.