Skip to content

Commit

Permalink
discard better invalid stratosattk1 frames
Browse files Browse the repository at this point in the history
  • Loading branch information
dernasherbrezon committed Aug 8, 2024
1 parent 3fd1443 commit 1a8ebec
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/java/ru/r2cloud/jradio/sstk1/StratosatTk1Beacon.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ public void readBeacon(byte[] data) throws IOException, UncorrectableException {
if (payloadLength > dis.available()) {
payloadLength = dis.available();
}
if (payloadLength < 0) {
throw new UncorrectableException("invalid field size");
}
switch (tk1Header.getMessageType()) {
case 0x0905:
case 0x9820:
Expand Down

0 comments on commit 1a8ebec

Please sign in to comment.