libvncserver
libvncserver copied to clipboard
rfb.h cleanup + fix OOB memory accesses in tight encoder
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).