Skip to content

Commit 28a3471

Browse files
authored
Merge pull request #333 from RUB-NDS/infinitloopfix
Fixed a rarely occuring Infinit loop in the receive message helper
2 parents df09d11 + 3ff387c commit 28a3471

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

TLS-Core/src/main/java/de/rub/nds/tlsattacker/core/workflow/action/executor/ReceiveMessageHelper.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,14 @@ private List<ProtocolMessage> handleCleanBytes(byte[] cleanProtocolMessageBytes,
197197
if (typeFromRecord == ProtocolMessageType.HANDSHAKE) {
198198
result = tryHandleAsUnknownHandshakeMessage(cleanProtocolMessageBytes, dataPointer,
199199
typeFromRecord, context);
200+
} else {
201+
try {
202+
result = tryHandleAsUnknownMessage(cleanProtocolMessageBytes, dataPointer, context);
203+
} catch (ParserException | AdjustmentException exUnknownHMsg) {
204+
LOGGER.warn("Could not parse Message as UnknownMessage");
205+
LOGGER.debug(exUnknownHMsg);
206+
break;
207+
}
200208
}
201209
} catch (ParserException exUnknownHandshakeMsg) {
202210
LOGGER.warn("Could not parse Message as UnknownHandshakeMessage");

0 commit comments

Comments
 (0)