Merge remote-tracking branch 'origin/master' into windowsDev

This commit is contained in:
sirjonasxx 2018-10-12 18:06:32 +02:00
commit 75964eec81
2 changed files with 8 additions and 1 deletions

View File

@ -197,7 +197,7 @@ public class HPacket implements StringifyAble {
String s = split[i]; String s = split[i];
if (s.equals("s")) { if (s.equals("s")) {
if (readUshort(readIndex) + 2 + readIndex > getBytesLength()) return false; if (readIndex + 2 > getBytesLength() || readUshort(readIndex) + 2 + readIndex > getBytesLength()) return false;
readString(); readString();
} }
else if (s.equals("i")) { else if (s.equals("i")) {
@ -840,5 +840,9 @@ public class HPacket implements StringifyAble {
} }
public static void main(String[] args) { public static void main(String[] args) {
HPacket packet = new HPacket("{l}{u:1442}");
System.out.println(packet.structureEquals("s,b"));
} }
} }

View File

@ -22,6 +22,9 @@ public class IncomingHandler extends Handler {
packet.readString(); packet.readString();
isEncryptedStream = packet.readBoolean(); isEncryptedStream = packet.readBoolean();
} }
else if (message.getIndex() > 3) {
((List<TrafficListener>)listeners[0]).remove(this);
}
} }
}; };