We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0c9e68a commit ad3a475Copy full SHA for ad3a475
1 file changed
libvncserver/tight.c
@@ -212,7 +212,7 @@ rfbNumCodedRectsTight(rfbClientPtr cl,
212
maxRectSize = tightConf[cl->tightCompressLevel].maxRectSize;
213
maxRectWidth = tightConf[cl->tightCompressLevel].maxRectWidth;
214
215
- if (w > maxRectWidth || w * h > maxRectSize) {
+ if (maxRectWidth > 0 && (w > maxRectWidth || w * h > maxRectSize)) {
216
subrectMaxWidth = (w > maxRectWidth) ? maxRectWidth : w;
217
subrectMaxHeight = maxRectSize / subrectMaxWidth;
218
return (((w - 1) / maxRectWidth + 1) *
0 commit comments