2
0
mirror of https://github.com/Genymobile/scrcpy synced 2025-08-31 14:25:56 +00:00

Fix control event String parsing

At least 2 bytes must be available to read the length of the String.
This commit is contained in:
Romain Vimont
2019-05-30 16:33:13 +02:00
parent 63c078ee6c
commit 61f5f96b42

View File

@@ -93,7 +93,7 @@ public class ControlEventReader {
}
private ControlEvent parseTextControlEvent() {
if (buffer.remaining() < 1) {
if (buffer.remaining() < 2) {
return null;
}
int len = toUnsigned(buffer.getShort());