aboutsummaryrefslogtreecommitdiffstats
path: root/rfbplayer
diff options
context:
space:
mode:
authorgeorge82 <george82@3789f03b-4d11-0410-bbf8-ca57d06f2519>2005-03-22 15:02:39 +0000
committergeorge82 <george82@3789f03b-4d11-0410-bbf8-ca57d06f2519>2005-03-22 15:02:39 +0000
commit888b8fbbeb51ff0a110308d771fd74c1b40c13d2 (patch)
tree4bde5c23cdad9f364b87ee3eb5dabe97328c92d4 /rfbplayer
parentdfb557b9e6e99329b77d9e70ee02eaca9c98d781 (diff)
downloadtigervnc-888b8fbbeb51ff0a110308d771fd74c1b40c13d2.tar.gz
tigervnc-888b8fbbeb51ff0a110308d771fd74c1b40c13d2.zip
Check bit-per-pixel when the pixel format assign from the command line.
It must <= 32 bits. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@265 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'rfbplayer')
-rw-r--r--rfbplayer/rfbplayer.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/rfbplayer/rfbplayer.cxx b/rfbplayer/rfbplayer.cxx
index 4c3cf3fb..da479993 100644
--- a/rfbplayer/rfbplayer.cxx
+++ b/rfbplayer/rfbplayer.cxx
@@ -1288,7 +1288,7 @@ bool processParams(int argc, char* argv[]) {
}
pf++;
}
- if ((r < 0) || (g < 0) || (b < 0)) return false;
+ if ((r < 0) || (g < 0) || (b < 0) || (r + g + b > 32)) return false;
if (strcasecmp(rgb_order, "rgb") == 0) { order = RGB_ORDER; }
else if (strcasecmp(rgb_order, "rbg") == 0) { order = RBG_ORDER; }
else if (strcasecmp(rgb_order, "grb") == 0) { order = GRB_ORDER; }