Tolerate fragmented ServerInit.

Issue #39: https://github.com/kanaka/noVNC/issues/issue/39
This commit is contained in:
Joel Martin 2010-12-24 15:02:48 -07:00
parent 0f7f146f20
commit 318d473438
1 changed files with 2 additions and 6 deletions

View File

@ -815,9 +815,7 @@ init_msg = function() {
break;
case 'SecurityResult' :
if (rQlen() < 4) {
return fail("Invalid VNC auth response");
}
if (rQwait("VNC auth response ", 24)) { return false; }
switch (rQshift32()) {
case 0: // OK
// Fall through to ClientInitialisation
@ -848,9 +846,7 @@ init_msg = function() {
break;
case 'ServerInitialisation' :
if (rQlen() < 24) {
return fail("Invalid server initialisation");
}
if (rQwait("server initialization", 24)) { return false; }
/* Screen size */
fb_width = rQshift16();