From 9f7abaea3ae6d7d6ed852132590b04fad8df22ae Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Tue, 10 Sep 2019 16:01:44 +0200 Subject: [PATCH] Fix depth sanity test in PixelFormat --- common/rfb/PixelFormat.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/rfb/PixelFormat.cxx b/common/rfb/PixelFormat.cxx index 883b041..552491d 100644 --- a/common/rfb/PixelFormat.cxx +++ b/common/rfb/PixelFormat.cxx @@ -678,7 +678,7 @@ bool PixelFormat::isSane(void) return false; totalBits = bits(redMax) + bits(greenMax) + bits(blueMax); - if (totalBits > bpp) + if (totalBits > depth) return false; if (((redMax << redShift) & (greenMax << greenShift)) != 0)