Allow the host to send empty clipboards to the guest
the check was too strict. Bug: 266956109 Test: check if clipboard sync host->guest Change-Id: Id63612e8e7b5264af4def4e1f5ed5c1e25995b4c Signed-off-by: Roman Kiryanov <rkir@google.com>
This commit is contained in:
@@ -111,7 +111,7 @@ class EmulatorClipboardMonitor implements Consumer<ClipData> {
|
||||
bb.order(ByteOrder.LITTLE_ENDIAN);
|
||||
final int msgLen = bb.getInt();
|
||||
|
||||
if (msgLen <= 0 || msgLen > MAX_CLIPBOARD_BYTES) {
|
||||
if (msgLen < 0 || msgLen > MAX_CLIPBOARD_BYTES) {
|
||||
throw new ProtocolException("Clipboard message length: " + msgLen + " out of bounds.");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user