mirror of
https://github.com/sirjonasxx/G-Earth.git
synced 2025-01-19 08:36:27 +01:00
critical bug in HPacket.structureEquals()
This commit is contained in:
parent
e6d3b6bf2f
commit
472c20e5e9
@ -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"));
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user