mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-19 14:19:53 +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
|
// Decode and validate the header
|
||||||
finalFrame = FrameEncoder.isFinalFrame(frame);
|
finalFrame = FrameEncoder.isFinalFrame(frame);
|
||||||
if(!finalFrame && ciphertextLength < frameLength)
|
if(!finalFrame && ciphertextLength < frameLength)
|
||||||
throw new EOFException();
|
throw new FormatException();
|
||||||
int payloadLength = FrameEncoder.getPayloadLength(frame);
|
int payloadLength = FrameEncoder.getPayloadLength(frame);
|
||||||
if(payloadLength > plaintextLength - HEADER_LENGTH)
|
if(payloadLength > plaintextLength - HEADER_LENGTH)
|
||||||
throw new FormatException();
|
throw new FormatException();
|
||||||
|
|||||||
Reference in New Issue
Block a user