mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 18:59:06 +01:00
Authentic but invalid frames should throw FormatException.
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user