aajisaka commented on code in PR #58909:
URL: https://github.com/apache/spark/pull/58909#discussion_r4553483981


##########
common/network-common/src/main/java/org/apache/spark/network/crypto/GcmTransportCipher.java:
##########
@@ -369,8 +370,9 @@ private boolean initializeExpectedLength(ByteBuf 
ciphertextNettyBuf) {
                 }
                 expectedLengthBuffer.flip();
                 expectedLength = expectedLengthBuffer.getLong();
-                if (expectedLength < 0) {
-                    throw new IllegalStateException("Invalid expected 
ciphertext length.");
+                if (expectedLength < LENGTH_HEADER_BYTES + headerLength) {

Review Comment:
   Fixed by 
https://github.com/apache/spark/pull/58909/changes/7512339b1f18b8b748a749cfb9b8b4a4befead33
   
   Updated to
   ```
                   if (length < minimumLength ||
                           (length > minimumLength && length < minimumLength + 
TAG_SIZE_BYTES)) {
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to