Repository navigation
Conversation
Signed-off-by: Jaehong Park <105151063+PHJ2000@users.noreply.github.com>
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Read frame payloads and incomplete-frame continuations through relative
ByteBufferoperations. The current backing-array copies ignore a sliced input's array offset and cannot read direct or read-only inputs. For example, decoding the slice containing82 02 0a 0bfrom a prefixed buffer produces payload02 0ainstead of0a 0b.The copies now consume exactly the requested bytes and preserve the input limit. Add a 64-case regression matrix for heap/direct and writable/read-only slices, masked/unmasked frames, empty/short/16-bit/64-bit payload lengths, consecutive frames, and split input. Forty-seven cases fail before the fix; all pass afterward.
Related Issue
Fixes #1512.
Motivation and Context
Valid sliced buffers must not silently corrupt payload bytes, and frame decoding should work with direct and read-only buffers as well as ordinary heap buffers.
How Has This Been Tested?
Temurin 17, Linux x86_64:
mvn -B -ntp -DskipTests package checkstyle:checkpassed.mvn ... test-compile org.apache.maven.plugins:maven-surefire-plugin:3.5.4:test: the default Surefire 2.17 runner did not discover the Jupiter tests.CustomSSLWebSocketServerFactoryTest.testWrapChannelfails withSSLHandshakeExceptionfor disabled legacy cipher suites; the same failure reproduces against the original production class. A second full run again had that failure and an intermittentIssue834Test.testNoNewThreadsfailure; the first run instead had an intermittentIssue997TestSSL callback assertion, which passed in the second run and in the baseline-focused run.Types of changes
Checklist