Skip to content
Snippets Groups Projects
Commit c8038a58 authored by akwizgran's avatar akwizgran
Browse files

Authentic but invalid frames should throw FormatException.

parent cea76cce
No related branches found
No related tags found
No related merge requests found
......@@ -115,7 +115,7 @@ class IncomingEncryptionLayer implements FrameReader {
// Decode and validate the header
finalFrame = FrameEncoder.isFinalFrame(frame);
if(!finalFrame && ciphertextLength < frameLength)
throw new EOFException();
throw new FormatException();
int payloadLength = FrameEncoder.getPayloadLength(frame);
if(payloadLength > plaintextLength - HEADER_LENGTH)
throw new FormatException();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment