As of 7124b5fbcf0df8db4d3f73023d77af6ea56409e7 the maximum rect width and size are equal for every compression level so we can easily save the LUT entries by using constants instead.
This fixes OOB memory accesses in rfbNumCodedRectsTight() when being called by rfbSendFramebufferUpdate() before SendRectEncodingTight() is being called the first time (which limits cl->tightCompressLevel to the size of tightConf).
Thanks so much for the nice contribution (again) @tobydox! I was seeing crashes in rfbNumCodedRectsTight() as well but couldn't quite figure out the reason.
As of 7124b5fbcf0df8db4d3f73023d77af6ea56409e7 the maximum rect width and size are equal for every compression level so we can easily save the LUT entries by using constants instead.
This fixes OOB memory accesses in
rfbNumCodedRectsTight()
when being called byrfbSendFramebufferUpdate()
beforeSendRectEncodingTight()
is being called the first time (which limitscl->tightCompressLevel
to the size oftightConf
).