Ignore rects with zero width or height

We can't do anything productive with these rects anyway
This commit is contained in:
Samuel Mannehed 2020-09-01 00:55:30 +02:00 committed by GitHub
parent 9142f8f0f7
commit 5462e17f25
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -2464,6 +2464,10 @@ export default class RFB extends EventTargetMixin {
return false; return false;
} }
if (this._FBU.width === 0 || this._FBU.height === 0) {
return true; // Ignore and mark as handled
}
try { try {
return decoder.decodeRect(this._FBU.x, this._FBU.y, return decoder.decodeRect(this._FBU.x, this._FBU.y,
this._FBU.width, this._FBU.height, this._FBU.width, this._FBU.height,