Skip to content

Commit 3cebc32

Browse files
authored
Parse records softlyfix (#384)
* fixed nullpointer exception * changed extraBytes to recordBytes
1 parent 457d12a commit 3cebc32

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ private List<AbstractRecord> parseRecords(byte[] recordBytes, TlsContext context
164164
} catch (ParserException ex) {
165165
LOGGER.debug(ex);
166166
LOGGER.debug("Could not parse provided Bytes into records. Waiting for more Packets");
167-
byte[] extraBytes = null;
167+
byte[] extraBytes = new byte[0];
168168
try {
169169
extraBytes = receiveByteArray(context);
170170
} catch (IOException ex2) {
@@ -174,7 +174,7 @@ private List<AbstractRecord> parseRecords(byte[] recordBytes, TlsContext context
174174
return parseRecords(ArrayConverter.concatenate(recordBytes, extraBytes), context);
175175
}
176176
LOGGER.debug("Did not receive more Bytes. Parsing records softly");
177-
return context.getRecordLayer().parseRecordsSoftly(extraBytes);
177+
return context.getRecordLayer().parseRecordsSoftly(recordBytes);
178178
}
179179
}
180180

0 commit comments

Comments
 (0)